Fix header card factory

It was using methods which don't exist.
This commit is contained in:
Javi Martín
2021-05-14 18:42:56 +02:00
parent 9466aed833
commit b196e83121
2 changed files with 4 additions and 3 deletions

View File

@@ -79,9 +79,6 @@ FactoryBot.define do
trait :header do
header { true }
sequence(:button_text) { |n| "Button text #{n}" }
sequence(:button_url) { |n| "Button url #{n}" }
alignment { "background" }
end
after :create do |widget_card|

View File

@@ -10,6 +10,10 @@ describe Widget::Card do
expect(card).to be_valid
end
it "is valid with a header" do
expect(build(:widget_card, :header)).to be_valid
end
it "is not valid without a title" do
expect(build(:widget_card, title: "")).not_to be_valid
end