fix tests, added videolistings_attributes:
This commit is contained in:
parent
4a4b97afd0
commit
51ff3f421b
@ -15,6 +15,9 @@ describe CampaignsController do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'should show the campaign page' do
|
it 'should show the campaign page' do
|
||||||
|
campaign[:videolistings_attributes] = []
|
||||||
|
campaign[:videolistings_attributes] << videolisting
|
||||||
|
|
||||||
post :create, campaign: campaign
|
post :create, campaign: campaign
|
||||||
get :show, campaign
|
get :show, campaign
|
||||||
expect(response.status).to eq 200
|
expect(response.status).to eq 200
|
||||||
@ -26,6 +29,9 @@ describe CampaignsController do
|
|||||||
|
|
||||||
|
|
||||||
it 'creates a campaign from json post' do
|
it 'creates a campaign from json post' do
|
||||||
|
campaign[:videolistings_attributes] = []
|
||||||
|
campaign[:videolistings_attributes] << videolisting
|
||||||
|
|
||||||
post :create, campaign: campaign
|
post :create, campaign: campaign
|
||||||
|
|
||||||
expect(response.status).to eq 302
|
expect(response.status).to eq 302
|
||||||
|
Loading…
Reference in New Issue
Block a user