Commit de893b19 authored by Shinya Maeda's avatar Shinya Maeda

Improve small things

parent 2633a635
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment