require 'spec_helper'

describe Rulebook, type: :model do
  it "should allow 2 rulebooks to exist" do
    FactoryBot.create(:rulebook)
    ac = described_class.new
    ac.subdomain = "new2"
    expect(ac).to be_valid
  end

  it "should be able to have a really long front_page" do
    ac = described_class.new
    ac.front_page = "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
    expect(ac.valid?).to eq(true)
    expect(ac.save).to eq(true)
  end
end
