Improve small things
This commit is contained in:
parent
2633a63531
commit
de893b19c3
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue