fixes from option change

This commit is contained in:
2022-12-10 19:22:44 +02:00
parent 2abdf7add1
commit d936fc05ab
12 changed files with 117 additions and 124 deletions

View File

@ -6,7 +6,7 @@ module Merged
it "has Style.cards" do
expect(CardStyle.cards.class).to be Hash
expect(CardStyle.cards.length).to be 4
expect(CardStyle.cards.length).to be 5
end
end

View File

@ -2,16 +2,19 @@ require 'rails_helper'
module Merged
RSpec.describe Option, type: :model do
let(:first) {Option.options.values.first}
let(:first) {Option.first}
it "has Option.options" do
expect(Option.options.class).to be Hash
it "has Option.first" do
expect(Option.first.class).to be Option
end
it "there are options" do
expect(Option.options.length).to be 16
expect(Option.all.length).to be 16
end
it "has option objects" do
expect(first.class).to be Option
end
it "has values" do
expect(first.values.class).to be Array
end
end
end

View File

@ -6,7 +6,7 @@ module Merged
it "has Style.sections" do
expect(SectionStyle.sections.class).to be Hash
expect(SectionStyle.sections.length).to be 6
expect(SectionStyle.sections.length).to be 7
end
it "Finds section by template" do
spacer = SectionStyle.sections["section_spacer"]