diff options
Diffstat (limited to 'spec/models/project_services/kubernetes_service_spec.rb')
-rw-r--r-- | spec/models/project_services/kubernetes_service_spec.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/spec/models/project_services/kubernetes_service_spec.rb b/spec/models/project_services/kubernetes_service_spec.rb index 7bf093b71e7..3a381cb405d 100644 --- a/spec/models/project_services/kubernetes_service_spec.rb +++ b/spec/models/project_services/kubernetes_service_spec.rb @@ -70,11 +70,11 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do kubernetes_service.properties['namespace'] = "foo" end - it 'should not update attributes' do + it 'does not update attributes' do expect(kubernetes_service.save).to be_falsy end - it 'should include an error with a deprecation message' do + it 'includes an error with a deprecation message' do kubernetes_service.valid? expect(kubernetes_service.errors[:base].first).to match(/Kubernetes service integration has been deprecated/) end @@ -83,7 +83,7 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do context 'with a non-deprecated service' do let(:kubernetes_service) { create(:kubernetes_service) } - it 'should update attributes' do + it 'updates attributes' do kubernetes_service.properties['namespace'] = 'foo' expect(kubernetes_service.save).to be_truthy end @@ -98,15 +98,15 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do kubernetes_service.save end - it 'should deactive the service' do + it 'deactivates the service' do expect(kubernetes_service.active?).to be_falsy end - it 'should not include a deprecation message as error' do + it 'does not include a deprecation message as error' do expect(kubernetes_service.errors.messages.count).to eq(0) end - it 'should update attributes' do + it 'updates attributes' do expect(kubernetes_service.properties['namespace']).to eq("foo") end end @@ -118,7 +118,7 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do kubernetes_service.properties['namespace'] = 'foo' end - it 'should update attributes' do + it 'updates attributes' do expect(kubernetes_service.save).to be_truthy expect(kubernetes_service.properties['namespace']).to eq('foo') end @@ -392,13 +392,13 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do let(:kubernetes_service) { create(:kubernetes_service) } context 'with an active kubernetes service' do - it 'should return false' do + it 'returns false' do expect(kubernetes_service.deprecated?).to be_falsy end end context 'with a inactive kubernetes service' do - it 'should return true' do + it 'returns true' do kubernetes_service.update_attribute(:active, false) expect(kubernetes_service.deprecated?).to be_truthy end @@ -408,18 +408,18 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do describe "#deprecation_message" do let(:kubernetes_service) { create(:kubernetes_service) } - it 'should indicate the service is deprecated' do + it 'indicates the service is deprecated' do expect(kubernetes_service.deprecation_message).to match(/Kubernetes service integration has been deprecated/) end context 'if the services is active' do - it 'should return a message' do + it 'returns a message' do expect(kubernetes_service.deprecation_message).to match(/Your Kubernetes cluster information on this page is still editable/) end end context 'if the service is not active' do - it 'should return a message' do + it 'returns a message' do kubernetes_service.update_attribute(:active, false) expect(kubernetes_service.deprecation_message).to match(/Fields on this page are now uneditable/) end |