Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/ci/group_variable_spec.rb')
-rw-r--r--spec/models/ci/group_variable_spec.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/spec/models/ci/group_variable_spec.rb b/spec/models/ci/group_variable_spec.rb
index e73319cfcd7..a2751b9fb20 100644
--- a/spec/models/ci/group_variable_spec.rb
+++ b/spec/models/ci/group_variable_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Ci::GroupVariable, feature_category: :pipeline_authoring do
+RSpec.describe Ci::GroupVariable, feature_category: :secrets_management do
let_it_be_with_refind(:group) { create(:group) }
subject { build(:ci_group_variable, group: group) }
@@ -65,4 +65,16 @@ RSpec.describe Ci::GroupVariable, feature_category: :pipeline_authoring do
expect(subject.audit_details).to eq(subject.key)
end
end
+
+ describe '#group_name' do
+ it "equals to the name of the group the variable belongs to" do
+ expect(subject.group_name).to eq(subject.group.name)
+ end
+ end
+
+ describe '#group_ci_cd_settings_path' do
+ it "equals to the path of the CI/CD settings of the group the variable belongs to" do
+ expect(subject.group_ci_cd_settings_path).to eq(Gitlab::Routing.url_helpers.group_settings_ci_cd_path(subject.group))
+ end
+ end
end