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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-05-06 03:07:56 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-05-06 03:07:56 +0300
commitf38bcf2e443dd89acc774a2fa1efa2e881a67a90 (patch)
treeac135b383df45c9536206dc41650b95b8dc7aa51 /spec/components/pajamas
parenta29707687893beecb0e333a12e6f9e093a77eeb9 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/components/pajamas')
-rw-r--r--spec/components/pajamas/alert_component_spec.rb18
1 files changed, 14 insertions, 4 deletions
diff --git a/spec/components/pajamas/alert_component_spec.rb b/spec/components/pajamas/alert_component_spec.rb
index 58c1cb2231a..e596f07a15a 100644
--- a/spec/components/pajamas/alert_component_spec.rb
+++ b/spec/components/pajamas/alert_component_spec.rb
@@ -2,13 +2,23 @@
require "spec_helper"
RSpec.describe Pajamas::AlertComponent, :aggregate_failures, type: :component do
- context 'with content' do
+ context 'slots' do
+ let_it_be(:body) { 'Alert body' }
+ let_it_be(:actions) { 'Alert actions' }
+
before do
- render_inline(described_class.new) { '_content_' }
+ render_inline described_class.new do |c|
+ c.body { body }
+ c.actions { actions }
+ end
+ end
+
+ it 'renders alert body' do
+ expect(rendered_component).to have_content(body)
end
- it 'has content' do
- expect(rendered_component).to have_text('_content_')
+ it 'renders actions' do
+ expect(rendered_component).to have_content(actions)
end
end