Sha256: b157307acaed1fba4e9baf4b540d7cb9a233e9acab92823e9ac892e340f2ab3c

Contents?: true

Size: 672 Bytes

Versions: 6

Compression:

Stored size: 672 Bytes

Contents

require 'test_helper'

class UsersControllerTest < ActionController::TestCase
  [:julien, :martha].each do |name|
    test "#{name} should get show" do
      sign_in users(name)
      get :show
      assert_response :ok
      assert_select 'h1', 'Welcome ' + users(name).email
    end
  end

  test "should sign_out a destroyed user" do
    sign_in users(:julien)
    users(:julien).destroy
    get :show
    assert_redirected_to new_user_session_url
  end

  test "should not get show" do
    get :show
    assert_redirected_to new_user_session_url
  end

  test "should not get show as xml" do
    get :show, :format => 'xml'
    assert_response :unauthorized
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
janus-0.10.1 test/functional/users_controller_test.rb
janus-0.10.0 test/functional/users_controller_test.rb
janus-0.9.1 test/functional/users_controller_test.rb
janus-0.9.0 test/functional/users_controller_test.rb
janus-0.8.1 test/functional/users_controller_test.rb
janus-0.8.0 test/functional/users_controller_test.rb