Sha256: a2cd09bcb6766c1fcd8a1615705db70012a37e1faded04905efeb404c95f0811

Contents?: true

Size: 435 Bytes

Versions: 26

Compression:

Stored size: 435 Bytes

Contents

require 'test_helper'

module PagesCms
  class PageTest < ActiveSupport::TestCase

    def setup
      @page = pages_cms_pages(:one)
    end

    test 'valid page' do
      assert @page.valid?, "Errors: #{@page.errors.full_messages.to_sentence} Slug:#{@page.slug}"
    end

    test 'slug gets parameterized' do
      page = Page.new(title: 'really cool')
      page.save
      assert_equal page.slug, 'really-cool'
    end

  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
pages_cms-2.1.1 test/models/pages_cms/page_test.rb
pages_cms-2.1.0 test/models/pages_cms/page_test.rb
pages_cms-2.0.1 test/models/pages_cms/page_test.rb
pages_cms-2.0.0 test/models/pages_cms/page_test.rb
pages_cms-1.2.3 test/models/pages_cms/page_test.rb
pages_cms-1.2.2 test/models/pages_cms/page_test.rb
pages_cms-1.2.1 test/models/pages_cms/page_test.rb
pages_cms-1.2.0 test/models/pages_cms/page_test.rb
pages_cms-1.1.0 test/models/pages_cms/page_test.rb
pages_cms-1.0.8 test/models/pages_cms/page_test.rb
pages_cms-1.0.6 test/models/pages_cms/page_test.rb
pages_cms-1.0.5 test/models/pages_cms/page_test.rb
pages_cms-1.0.4 test/models/pages_cms/page_test.rb
pages_cms-1.0.3 test/models/pages_cms/page_test.rb
pages_cms-1.0.2 test/models/pages_cms/page_test.rb
pages_cms-1.0.1 test/models/pages_cms/page_test.rb
pages_cms-1.0.0 test/models/pages_cms/page_test.rb
pages_cms-0.2.3 test/models/pages_cms/page_test.rb
pages_cms-0.2.2 test/models/pages_cms/page_test.rb
pages_cms-0.2.1 test/models/pages_cms/page_test.rb