diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-10-17 22:06:10 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-10-17 22:06:10 +0300 |
commit | e9880722076081df1576a3fb01e2c30feb6208ba (patch) | |
tree | 790238d3777285a5f42947b42f906cdaee7e8c94 /spec/services/create_deployment_service_spec.rb | |
parent | 4a369185d77013b2138f2daf6d85b1358425e75c (diff) |
Fix environments specs
Diffstat (limited to 'spec/services/create_deployment_service_spec.rb')
-rw-r--r-- | spec/services/create_deployment_service_spec.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/services/create_deployment_service_spec.rb b/spec/services/create_deployment_service_spec.rb index d4ceb83caf8..5a4562b939b 100644 --- a/spec/services/create_deployment_service_spec.rb +++ b/spec/services/create_deployment_service_spec.rb @@ -54,8 +54,8 @@ describe CreateDeploymentService, services: true do expect(environment.reload).to be_available end - it 'does not create a deployment' do - expect(subject).not_to be_persisted + it 'does create a deployment' do + expect(subject).to be_persisted end end end @@ -95,7 +95,7 @@ describe CreateDeploymentService, services: true do end it 'does not create a deployment' do - expect(subject).not_to be_persisted + expect(subject).to be_nil end end @@ -127,6 +127,8 @@ describe CreateDeploymentService, services: true do end context 'and environment exist' do + let!(:environment) { create(:environment, project: project, name: 'review-apps/feature-review-apps') } + it 'does not create a new environment' do expect { subject }.not_to change { Environment.count } end |