Files
nairobi/spec/helpers/legislation_helper_spec.rb
Javi Martín f79a21f071 Add and apply RSpec/BeEq rubocop rule
This rule was added in rubocop-rspec 2.9.0. Once again, we were applying
it about 50% of the time.
2023-09-06 19:00:56 +02:00

32 lines
976 B
Ruby

require "rails_helper"
describe LegislationHelper do
let(:process) { build(:legislation_process) }
it "is valid" do
expect(process).to be_valid
end
describe "banner colors presence" do
it "background and font color exist" do
@process = build(:legislation_process, background_color: "#944949", font_color: "#ffffff")
expect(banner_color?).to be true
end
it "background color exist and font color not exist" do
@process = build(:legislation_process, background_color: "#944949", font_color: "")
expect(banner_color?).to be false
end
it "background color not exist and font color exist" do
@process = build(:legislation_process, background_color: "", font_color: "#944949")
expect(banner_color?).to be false
end
it "background and font color not exist" do
@process = build(:legislation_process, background_color: "", font_color: "")
expect(banner_color?).to be false
end
end
end