Sha256: 3e0c952ce6efe6fc6d10ac6bb63197ca970033373fb0b1cc72d2da5b11c86c53

Contents?: true

Size: 1 KB

Versions: 33

Compression:

Stored size: 1 KB

Contents

=begin
require 'test_helper'

class SearchControllerTest < Zena::Controller::TestCase

  def test_find_children_for_anon
    post 'find', :id=>nodes_id(:people), :search=>''
    assert_response :success
    assert_equal 2, assigns['results'].size
  end

  def test_find_children_for_ant
    login(:ant)
    post 'find', :id=>nodes_id(:people)
    assert_response :success
    assert_equal 3, assigns['results'].size
  end

  def test_find_with_attribute
    post 'find', :search=>'lake'
    assert_response :success
    assert_equal 2, assigns['results'].size
    assert_tag :p, :attributes=>{:class=>'result_id'}
  end

  def test_find_private
    login(:ant)
    post 'find', :search=>'ant'
    assert_response :success
    assert_equal 1, assigns['results'].size
    assert_equal 'ant', assigns['results'][0].name
    assert_tag :p, :attributes=>{:class=>'result_id'}
  end

  def test_do_not_find_private
    post 'find', :search=>'ant'
    assert_response :success
    assert_equal [], assigns['results']
  end
end
=end

Version data entries

33 entries across 33 versions & 1 rubygems

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