summaryrefslogtreecommitdiff
path: root/spec/models/ci/pipeline_variable_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/ci/pipeline_variable_spec.rb')
-rw-r--r--spec/models/ci/pipeline_variable_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/models/ci/pipeline_variable_spec.rb b/spec/models/ci/pipeline_variable_spec.rb
index 889c243c8d8..03d09cb31d6 100644
--- a/spec/models/ci/pipeline_variable_spec.rb
+++ b/spec/models/ci/pipeline_variable_spec.rb
@@ -5,4 +5,13 @@ describe Ci::PipelineVariable do
it { is_expected.to include_module(HasVariable) }
it { is_expected.to validate_uniqueness_of(:key).scoped_to(:pipeline_id) }
+
+ describe '#hook_attrs' do
+ let(:variable) { create(:ci_pipeline_variable, key: 'foo', value: 'bar') }
+
+ subject { variable.hook_attrs }
+
+ it { is_expected.to be_a(Hash) }
+ it { is_expected.to eq({ key: 'foo', value: 'bar' }) }
+ end
end