summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2017-06-28 15:25:36 +0900
committerShinya Maeda <shinya@gitlab.com>2017-06-28 15:25:36 +0900
commitde893b19c30acf83ce43dd42376783505d704763 (patch)
tree20c3a92617e61d253f7fa20f646e695c90b805ed
parent2633a635311f60d15d9729dc770fdf2324a67927 (diff)
downloadgitlab-ce-feature/sm/34314-add-hasvariable-concern.tar.gz
-rw-r--r--spec/models/ci/variable_spec.rb2
-rw-r--r--spec/models/concerns/has_variable_spec.rb4
2 files changed, 2 insertions, 4 deletions
diff --git a/spec/models/ci/variable_spec.rb b/spec/models/ci/variable_spec.rb
index ade279cd16f..329682a0771 100644
--- a/spec/models/ci/variable_spec.rb
+++ b/spec/models/ci/variable_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe Ci::Variable, models: true do
subject { build(:ci_variable) }
- it { is_expected.to be_kind_of(HasVariable) }
+ it { is_expected.to include_module(HasVariable) }
it { is_expected.to validate_uniqueness_of(:key).scoped_to(:project_id) }
describe '.unprotected' do
diff --git a/spec/models/concerns/has_variable_spec.rb b/spec/models/concerns/has_variable_spec.rb
index 3bb2d01e7c5..f4b24e6d1d9 100644
--- a/spec/models/concerns/has_variable_spec.rb
+++ b/spec/models/concerns/has_variable_spec.rb
@@ -3,8 +3,6 @@ require 'spec_helper'
describe HasVariable do
subject { build(:ci_variable) }
- let(:secret_value) { 'secret' }
-
it { is_expected.to validate_presence_of(:key) }
it { is_expected.to validate_length_of(:key).is_at_most(255) }
it { is_expected.to allow_value('foo').for(:key) }
@@ -13,7 +11,7 @@ describe HasVariable do
describe '#value' do
before do
- subject.value = secret_value
+ subject.value = 'secret'
end
it 'stores the encrypted value' do