@lg = FactoryGirl.create :license_group
@sp = FactoryGirl.create :system_picture
@user = FactoryGirl.create( :user_yas)
- @author = @user.author
+ @author = FactoryGirl.create :author, :user_id => @user.id
@artist = FactoryGirl.create :artist_yas, :author_id => @author.id
end
sign_in @user
License.stub(:list).and_return([@l, @l, @l])
end
- context 'つつがなく終わるとき' do
+ context 'つつがなく終わるとき' do
it 'ステータスコード200 OKを返す' do
get :index
response.should be_success
get :show, :id => @l.id, :format => :json
json = JSON.parse response.body
json["name"].should match(/peta/)
- json["caption"].should_not be_nil\r
- json["url"].should_not be_nil\r
+ json["caption"].should_not be_nil
+ json["url"].should_not be_nil
end
end
end