Skip to content
Snippets Groups Projects
Verified Commit 92d51da2 authored by Matija Čupić's avatar Matija Čupić
Browse files

Use actual repo instead of stubbing method

parent 78cee2c5
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
@@ -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)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment