fix tests, added videolistings_attributes:

This commit is contained in:
Tyrel Souza 2014-04-24 16:40:49 -04:00
parent 4a4b97afd0
commit 51ff3f421b

View File

@ -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