Sha256: 7a4d324a7eab2ebd95cd51c2e16c22b8b95082ed27aca4b0ba126e427ab506fd

Contents?: true

Size: 801 Bytes

Versions: 1

Compression:

Stored size: 801 Bytes

Contents

require 'rails_helper'

module Anubis
  RSpec.describe MenuLocale, type: :model do
    it "has short title" do
      expect(build_stubbed(:menu_locale, title: 'T'*2)).to be_invalid
    end

    it "has long title" do
      expect(build_stubbed(:menu_locale, title: 'T'*101)).to be_invalid
    end

    it "has short page title" do
      expect(build_stubbed(:menu_locale, page_title: 'T'*2)).to be_invalid
    end

    it "has long page title" do
      expect(build_stubbed(:menu_locale, page_title: 'T'*201)).to be_invalid
    end

    it "has long short title" do
      expect(build_stubbed(:menu_locale, short_title: 'T'*201)).to be_invalid
    end

    it "can change data" do
      menu = create :menu_locale
      menu.title = 'Test title 2'
      expect(menu.save).to eq true
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
anoubis-1.0.0 spec/models/anoubis/menu_locale_spec.rb