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/helpers/commits_helper_spec.rb')
-rw-r--r--spec/helpers/commits_helper_spec.rb36
1 files changed, 28 insertions, 8 deletions
diff --git a/spec/helpers/commits_helper_spec.rb b/spec/helpers/commits_helper_spec.rb
index 27738f73ea5..c947d11e9de 100644
--- a/spec/helpers/commits_helper_spec.rb
+++ b/spec/helpers/commits_helper_spec.rb
@@ -325,21 +325,41 @@ RSpec.describe CommitsHelper do
assign(:path, current_path)
end
- it { is_expected.to be_an(Array) }
- it { is_expected.to include(commit) }
- it { is_expected.to include(commit.author) }
- it { is_expected.to include(ref) }
-
specify do
- is_expected.to include(
+ expect(subject).to eq([
+ commit,
+ commit.author,
+ ref,
{
merge_request: merge_request.cache_key,
pipeline_status: pipeline.cache_key,
xhr: true,
controller: "commits",
- path: current_path
+ path: current_path,
+ referenced_by: helper.tag_checksum(commit.referenced_by)
}
- )
+ ])
+ end
+
+ context 'when the show_tags_on_commits_view flag is disabled' do
+ before do
+ stub_feature_flags(show_tags_on_commits_view: false)
+ end
+
+ specify do
+ expect(subject).to eq([
+ commit,
+ commit.author,
+ ref,
+ {
+ merge_request: merge_request.cache_key,
+ pipeline_status: pipeline.cache_key,
+ xhr: true,
+ controller: "commits",
+ path: current_path
+ }
+ ])
+ end
end
describe "final cache key output" do