Sha256: 44e9d75bbba80de71408cfbf1cf0dc86e0cebe1f196c091b5f0cefdc566068cc

Contents?: true

Size: 940 Bytes

Versions: 33

Compression:

Stored size: 940 Bytes

Contents

require 'test_helper'

class LinksControllerTest < Zena::Controller::TestCase

  def test_route
    assert_equal '/nodes/15/links/99', node_link_path(:node_id => 15, :id => 99)
    assert_equal '/nodes/15/links/99/edit', edit_node_link_path(:node_id => 15, :id => 99)
    assert_equal '/nodes/15/links', node_links_path(:node_id => 15)
  end

  def test_create
    login(:lion)
    node = secure!(Node) { nodes(:letter) }
    assert_nil node.find(:first, 'calendar')
    post 'create', 'node_id' => nodes_zip(:letter), 'link' => {'other_zip' => nodes_zip(:zena).to_s, 'role' => 'calendar', 'comment' => 'super icon'}
    assert_response :success
    node = assigns(:node)
    assert node.errors.empty?
    node = secure!(Node) { nodes(:letter) }
    assert calendar = node.find(:first, 'calendar')
    assert_equal nodes_id(:zena), calendar[:id]
    assert_equal 'super icon', calendar.l_comment
    assert_nil calendar.l_status
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
zena-1.2.8 test/functional/links_controller_test.rb
zena-1.2.7 test/functional/links_controller_test.rb
zena-1.2.6 test/functional/links_controller_test.rb
zena-1.2.5 test/functional/links_controller_test.rb
zena-1.2.4 test/functional/links_controller_test.rb
zena-1.2.3 test/functional/links_controller_test.rb
zena-1.2.2 test/functional/links_controller_test.rb
zena-1.2.1 test/functional/links_controller_test.rb
zena-1.2.0 test/functional/links_controller_test.rb
zena-1.1.3 test/functional/links_controller_test.rb
zena-1.1.2 test/functional/links_controller_test.rb
zena-1.1.1 test/functional/links_controller_test.rb
zena-1.1.0 test/functional/links_controller_test.rb
zena-1.0.0 test/functional/links_controller_test.rb
zena-1.0.0.rc3 test/functional/links_controller_test.rb
zena-1.0.0.rc2 test/functional/links_controller_test.rb
zena-1.0.0.rc1 test/functional/links_controller_test.rb
zena-0.16.9 test/functional/links_controller_test.rb
zena-1.0.0.beta3 test/functional/links_controller_test.rb
zena-0.16.8 test/functional/links_controller_test.rb