forked from solidusio/solidus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomponent_spec.rb
More file actions
33 lines (25 loc) · 772 Bytes
/
component_spec.rb
File metadata and controls
33 lines (25 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# frozen_string_literal: true
require "spec_helper"
RSpec.describe SolidusAdmin::Layout::Flashes::Toasts::Component, type: :component do
let(:component) { described_class.new(toasts:) }
describe "error toast" do
let(:toasts) { { error: "Some error" } }
it "renders correctly" do
render_inline(component)
aggregate_failures do
expect(page).to have_content("Some error")
expect(page).to have_css(".bg-red-500")
end
end
end
describe "default toast" do
let(:toasts) { { notice: "All good" } }
it "renders correctly" do
render_inline(component)
aggregate_failures do
expect(page).to have_content("All good")
expect(page).to have_css(".bg-full-black")
end
end
end
end