Sha256: f96a961ca19e0d81ea4117ae463078d4506a198082edd94ca97ce57f0e7cdf72

Contents?: true

Size: 1.04 KB

Versions: 22

Compression:

Stored size: 1.04 KB

Contents

require 'test_helper'

module Guts
  class NavigationItemTest < ActiveSupport::TestCase
    test 'should not create without title' do
      navigation = NavigationItem.new
      
      assert_not navigation.save
    end
    
    test 'should return metafields for navigation' do
      navigation = guts_navigation_items :test_navigation_item
      
      assert_operator navigation.metafields.size, :>, 0
    end
    
    test 'should return navigation' do
      navigation = guts_navigation_items :test_navigation_item
      
      assert navigation.navigation
    end
    
    test 'should return navigatable' do
      navigation = guts_navigation_items :test_navigation_item
      
      assert navigation.navigatable
    end
    
    test 'should not be custom' do
      navigation = guts_navigation_items :test_navigation_item
      
      assert_equal false, navigation.custom?
    end
    
    test 'should be custom' do
      navigation = guts_navigation_items :test_navigation_item_two
      
      assert_equal true, navigation.custom?
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
guts-3.1.2 test/models/guts/navigation_item_test.rb
guts-3.1.1 test/models/guts/navigation_item_test.rb
guts-3.1.0 test/models/guts/navigation_item_test.rb
guts-3.0.1 test/models/guts/navigation_item_test.rb
guts-3.0.0 test/models/guts/navigation_item_test.rb
guts-2.1.0 test/models/guts/navigation_item_test.rb
guts-2.0.2 test/models/guts/navigation_item_test.rb
guts-2.0.1 test/models/guts/navigation_item_test.rb
guts-2.0.0 test/models/guts/navigation_item_test.rb
guts-1.4.0 test/models/guts/navigation_item_test.rb
guts-1.3.6 test/models/guts/navigation_item_test.rb
guts-1.3.5 test/models/guts/navigation_item_test.rb
guts-1.3.4 test/models/guts/navigation_item_test.rb
guts-1.3.3 test/models/guts/navigation_item_test.rb
guts-1.3.2 test/models/guts/navigation_item_test.rb
guts-1.3.1 test/models/guts/navigation_item_test.rb
guts-1.3.0 test/models/guts/navigation_item_test.rb
guts-1.2.2 test/models/guts/navigation_item_test.rb
guts-1.2.1 test/models/guts/navigation_item_test.rb
guts-1.2.0 test/models/guts/navigation_item_test.rb