diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-15 21:09:50 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-15 21:09:50 +0300 |
commit | b302502690b2e1422a4ef6abebdcf3ff4dc88543 (patch) | |
tree | 0cd7ca6ff21b59c007277b5bae9611a7cedd8134 /spec/views/layouts | |
parent | b616fd825faac3e7f194e1f942ef30730021e463 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/views/layouts')
-rw-r--r-- | spec/views/layouts/_flash.html.haml_spec.rb | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/spec/views/layouts/_flash.html.haml_spec.rb b/spec/views/layouts/_flash.html.haml_spec.rb index 82c06feb4fb..a4bed09368f 100644 --- a/spec/views/layouts/_flash.html.haml_spec.rb +++ b/spec/views/layouts/_flash.html.haml_spec.rb @@ -9,7 +9,11 @@ RSpec.describe 'layouts/_flash' do end describe 'closable flash messages' do - %w(alert notice success).each do |flash_type| + where(:flash_type) do + %w[alert notice success] + end + + with_them do let(:flash) { { flash_type => 'This is a closable flash message' } } it 'shows a close button' do @@ -19,10 +23,14 @@ RSpec.describe 'layouts/_flash' do end describe 'non closable flash messages' do - %w(error message toast warning).each do |flash_type| + where(:flash_type) do + %w[error message toast warning] + end + + with_them do let(:flash) { { flash_type => 'This is a non closable flash message' } } - it 'shows a close button' do + it 'does not show a close button' do expect(rendered).not_to include('js-close-icon') end end |