Initial commit

This commit is contained in:
Senad Uka
2020-05-31 22:38:19 +02:00
commit 858fafc3c5
1280 changed files with 65918 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
require "rails_helper"
RSpec.describe CardsHelper, type: :helper do
describe "#card_header" do
it "includes a heading element" do
header = helper.card_header(text: "Foo")
expect(header).to have_css "h1", text: "Foo"
end
it "includes subtext when present" do
header = helper.card_header(subtext: "Bar")
expect(header).to have_css "small", text: "Bar"
end
it "includes close button when present" do
header = helper.card_header(close_action_path: "/foo")
expect(header).to have_css "a[href='/foo']", text: "Close"
end
end
end