diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-17 19:05:49 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-17 19:05:49 +0300 |
commit | 43a25d93ebdabea52f99b05e15b06250cd8f07d7 (patch) | |
tree | dceebdc68925362117480a5d672bcff122fb625b /spec/helpers/labels_helper_spec.rb | |
parent | 20c84b99005abd1c82101dfeff264ac50d2df211 (diff) |
Add latest changes from gitlab-org/gitlab@16-0-stable-eev16.0.0-rc42
Diffstat (limited to 'spec/helpers/labels_helper_spec.rb')
-rw-r--r-- | spec/helpers/labels_helper_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/helpers/labels_helper_spec.rb b/spec/helpers/labels_helper_spec.rb index e8e981251e3..b4549630813 100644 --- a/spec/helpers/labels_helper_spec.rb +++ b/spec/helpers/labels_helper_spec.rb @@ -62,19 +62,19 @@ RSpec.describe LabelsHelper do end context 'with a project as subject' do - let(:namespace) { build(:namespace, name: 'foo3') } - let(:subject) { build(:project, namespace: namespace, name: 'bar3') } + let(:namespace) { build(:namespace) } + let(:subject) { build(:project, namespace: namespace) } it 'links to project issues page' do - expect(link_to_label(label_presenter)).to match %r{<a.*href="/foo3/bar3/-/issues\?label_name%5B%5D=#{label.name}".*>.*</a>}m + expect(link_to_label(label_presenter)).to match %r{<a.*href="/#{subject.full_path}/-/issues\?label_name%5B%5D=#{label.name}".*>.*</a>}m end end context 'with a group as subject' do - let(:subject) { build(:group, name: 'bar') } + let(:subject) { build(:group) } it 'links to group issues page' do - expect(link_to_label(label_presenter)).to match %r{<a.*href="/groups/bar/-/issues\?label_name%5B%5D=#{label.name}".*>.*</a>}m + expect(link_to_label(label_presenter)).to match %r{<a.*href="/groups/#{subject.path}/-/issues\?label_name%5B%5D=#{label.name}".*>.*</a>}m end end @@ -126,11 +126,11 @@ RSpec.describe LabelsHelper do end it 'uses dark text on light backgrounds' do - expect(text_color_for_bg('#EEEEEE')).to be_color('#333333') + expect(text_color_for_bg('#EEEEEE')).to be_color('#1F1E24') end it 'supports RGB triplets' do - expect(text_color_for_bg('#FFF')).to be_color '#333333' + expect(text_color_for_bg('#FFF')).to be_color '#1F1E24' expect(text_color_for_bg('#000')).to be_color '#FFFFFF' end end |