#394: fixed specs

This commit is contained in:
Vokhmin Alexey V 2014-05-29 01:53:50 +04:00
parent 00ec76cd15
commit 493fe62d8d
2 changed files with 9 additions and 5 deletions

View File

@ -82,7 +82,10 @@ shared_examples_for 'validation error via build list api' do |message|
end end
describe Api::V1::BuildListsController do describe Api::V1::BuildListsController do
before { stub_symlink_methods } before do
stub_symlink_methods
allow_any_instance_of(BuildList).to receive(:valid_branch_for_publish?).and_return(true)
end
context 'create and update abilities' do context 'create and update abilities' do
context 'for user' do context 'for user' do

View File

@ -77,10 +77,7 @@ describe Projects::BuildListsController do
end end
end end
before do before { stub_symlink_methods }
stub_symlink_methods
allow_any_instance_of(BuildList).to receive(:valid_branch_for_publish?).and_return(true)
end
context 'crud' do context 'crud' do
before do before do
@ -132,6 +129,10 @@ describe Projects::BuildListsController do
put :rerun_tests, id: @build_list put :rerun_tests, id: @build_list
end end
before do
allow_any_instance_of(BuildList).to receive(:can_rerun_tests?).and_return(true)
end
context 'if user is project owner' do context 'if user is project owner' do
before { set_session_for(@owner_user) } before { set_session_for(@owner_user) }