Sha256: 71a6e2d1c2757e38a9a2c999d70fd8871ea4ce58ec2681b0d9cf5e288d3d6a1b

Contents?: true

Size: 598 Bytes

Versions: 5

Compression:

Stored size: 598 Bytes

Contents

require 'test_plugin_helper'

class DiscoversControllerTest < ActionController::TestCase
  setup :initialize_host

  def test_index
    get :index, {}, set_session_user
    assert_response :success
  end

  def test_index_json
    get :index, {:format => "json"}, set_session_user
    domain = ActiveSupport::JSON.decode(@response.body)
    assert_response :success
  end

  def test_add_entry_to_nav_menu
    get :index, {}, set_session_user
    assert_tag :tag => 'a',
      :attributes => {:href => '/discovers'}
  end

  private
  def initialize_host
    User.current = users(:admin)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
foreman_discovery-1.3.0.rc2 test/functional/discovers_controller_test.rb
foreman_discovery-1.3.0.rc1 test/functional/discovers_controller_test.rb
foreman_discovery-1.2.0 test/functional/discovers_controller_test.rb
foreman_discovery-1.2.0.rc2 test/functional/discovers_controller_test.rb
foreman_discovery-1.2.0.rc1 test/functional/discovers_controller_test.rb