[refs #777] fix ProductBuildList specs

This commit is contained in:
Alexander Machehin 2012-12-17 22:11:03 +06:00
parent 6f1b50e262
commit f078b51d0c
1 changed files with 8 additions and 6 deletions

View File

@ -24,8 +24,10 @@ shared_examples_for 'product build list admin' do
end
it 'should be able to perform cancel action' do
url = platform_product_product_build_list_path(@product.platform, @product, @pbl)
@request.env['HTTP_REFERER'] = url
put :cancel, valid_attributes_for_show
response.should redirect_to(platform_product_product_build_list_path(@product.platform, @product, @pbl))
response.should redirect_to(url)
end
it 'should be able to perform show action' do
@ -131,7 +133,7 @@ describe Platforms::ProductBuildListsController do
before(:each) do
@user = FactoryGirl.create(:user)
set_session_for(@user)
@pbl.product.platform.relations.create!(:actor_type => 'User', :actor_id => @user.id, :role => 'admin')
@product.platform.relations.create!(:actor_type => 'User', :actor_id => @user.id, :role => 'admin')
end
it_should_behave_like 'product build list admin'