Commit 92d51da2 authored by Matija Čupić's avatar Matija Čupić

Use actual repo instead of stubbing method

parent 78cee2c5
Pipeline #19318366 passed with stages
in 42 minutes and 25 seconds
......@@ -48,10 +48,6 @@ describe Projects::PipelinesSettingsController do
end
context 'when the project repository is empty' do
before do
allow_any_instance_of(Project).to receive(:empty_repo?).and_return(true)
end
it 'sets a warning flash' do
expect(subject).to set_flash[:warning]
end
......@@ -64,9 +60,7 @@ describe Projects::PipelinesSettingsController do
end
context 'when the project repository is not empty' do
before do
allow_any_instance_of(Project).to receive(:empty_repo?).and_return(false)
end
let(:project) { create(:project, :repository) }
it 'sets a success flash' do
allow(CreatePipelineWorker).to receive(:perform_async).with(project.id, user.id, project.default_branch, :web, any_args)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment