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