Sha256: 7d85e634e478c36f5b881b77baa4eac1a1583695ec9c4a6c45234ec020a91ba8

Contents?: true

Size: 506 Bytes

Versions: 1

Compression:

Stored size: 506 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 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

1 entries across 1 versions & 1 rubygems

Version Path
janus-0.5.0 test/functional/users_controller_test.rb