diff options
Diffstat (limited to 'spec/services/ci/create_project_service_spec.rb')
-rw-r--r-- | spec/services/ci/create_project_service_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/services/ci/create_project_service_spec.rb b/spec/services/ci/create_project_service_spec.rb index c4b62e4fa9e..234a778f8cc 100644 --- a/spec/services/ci/create_project_service_spec.rb +++ b/spec/services/ci/create_project_service_spec.rb @@ -5,14 +5,14 @@ describe Ci::CreateProjectService do let(:current_user) { double.as_null_object } let(:project_dump) { YAML.load File.read(Rails.root.join('spec/support/gitlab_stubs/raw_project.yml')) } - before { Network.any_instance.stub(enable_ci: true) } + before { allow_any_instance_of(Network).to receive_messages(enable_ci: true) } describe :execute do context 'valid params' do let(:project) { service.execute(current_user, project_dump, 'http://localhost/projects/:project_id') } - it { project.should be_kind_of(Project) } - it { project.should be_persisted } + it { expect(project).to be_kind_of(Project) } + it { expect(project).to be_persisted } end context 'without project dump' do @@ -31,9 +31,9 @@ describe Ci::CreateProjectService do project = service.execute(current_user, project_dump, 'http://localhost/projects/:project_id', origin_project) - project.shared_runners_enabled.should be_true - project.public.should be_true - project.allow_git_fetch.should be_true + expect(project.shared_runners_enabled).to be_truthy + expect(project.public).to be_truthy + expect(project.allow_git_fetch).to be_truthy end end end |