Sha256: 9c1870e612e1d9fddae82c8917d2ed6c394287a575417beedb95ca752e0e608f

Contents?: true

Size: 872 Bytes

Versions: 37

Compression:

Stored size: 872 Bytes

Contents

require 'test/helper'

class StringTest < ActiveSupport::TestCase

  def test_should_return_post_actions_for_index
    assert_equal %w( cleanup ), 'Post'.typus_actions_for('index')
    assert_equal %w( cleanup ), 'Post'.typus_actions_for(:index)
  end

  def test_should_return_post_actions_for_edit
    assert_equal %w( send_as_newsletter preview ), 'Post'.typus_actions_for('edit')
    assert_equal %w( send_as_newsletter preview ), 'Post'.typus_actions_for(:edit)
  end

  def test_should_verify_typus_actions_for_unexisting_returns_is_empty
    assert 'TypusUser'.typus_actions_for('unexisting').empty?
    assert 'TypusUser'.typus_actions_for(:unexisting).empty?
  end

  def test_should_verify_typus_actions_for_index_returns_an_array
    assert 'Post'.typus_actions_for('index').kind_of?(Array)
    assert 'Post'.typus_actions_for(:index).kind_of?(Array)
  end

end

Version data entries

37 entries across 37 versions & 2 rubygems

Version Path
fesplugas-typus-0.9.0 test/lib/string_test.rb
fesplugas-typus-0.9.1 test/lib/string_test.rb
fesplugas-typus-0.9.10 test/lib/string_test.rb
fesplugas-typus-0.9.11 test/lib/string_test.rb
fesplugas-typus-0.9.12 test/lib/string_test.rb
fesplugas-typus-0.9.13 test/lib/string_test.rb
fesplugas-typus-0.9.14 test/lib/string_test.rb
fesplugas-typus-0.9.15 test/lib/string_test.rb
fesplugas-typus-0.9.16 test/lib/string_test.rb
fesplugas-typus-0.9.17 test/lib/string_test.rb
fesplugas-typus-0.9.2 test/lib/string_test.rb
fesplugas-typus-0.9.3 test/lib/string_test.rb
fesplugas-typus-0.9.4 test/lib/string_test.rb
fesplugas-typus-0.9.5 test/lib/string_test.rb
fesplugas-typus-0.9.6 test/lib/string_test.rb
fesplugas-typus-0.9.7 test/lib/string_test.rb
fesplugas-typus-0.9.8 test/lib/string_test.rb
fesplugas-typus-0.9.9 test/lib/string_test.rb
typus-0.9.35 test/lib/string_test.rb
typus-0.9.34 test/lib/string_test.rb