Files
grecia/spec/models/link_spec.rb
Javi Martín 8e276e2891 Add FactoryBot/ConsistentParenthesesStyle rule
This rule was added in rubocop-rspec 2.14.0. We were already applying it
most of the time.
2023-09-06 19:00:56 +02:00

16 lines
353 B
Ruby

require "rails_helper"
describe Link do
let(:action) { build(:dashboard_action) }
it "is invalid when label is blank" do
link = build(:link, linkable: action, label: "")
expect(link).not_to be_valid
end
it "is invalid when url is blank" do
link = build(:link, linkable: action, url: "")
expect(link).not_to be_valid
end
end