rspec tests were added for the process banner
This commit is contained in:
31
spec/helpers/legislation_helper_spec.rb
Normal file
31
spec/helpers/legislation_helper_spec.rb
Normal file
@@ -0,0 +1,31 @@
|
||||
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 eq(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 eq(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 eq(false)
|
||||
end
|
||||
|
||||
it "background and font color not exist" do
|
||||
@process = build(:legislation_process, background_color: "", font_color: "")
|
||||
expect(banner_color?).to eq(false)
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user