Sha256: 90abfd09a515e4c63501d9d52163bbe75301bdfd75e2b32819776f38b493d7bb

Contents?: true

Size: 1.57 KB

Versions: 83

Compression:

Stored size: 1.57 KB

Contents

require 'test_helper'

SimpleCov.command_name "test:functionals"

class Contour::AuthenticationsControllerTest < ActionController::TestCase
  setup do
    login(users(:valid))
    @request.env["omniauth.auth"] = {'provider' => 'google_apps', 'info'=> {'email' => 'test@example.com'}}
    @authentication = authentications(:open_id)
  end

  test "should get index" do
    get :index
    assert_response :success
    assert_not_nil assigns(:authentications)
  end

  # TODO: Remove
  # test "should get new" do
  #   get :new
  #   assert_response :success
  # end

  # TODO Redirects to Authentication Controller if user logged in, if not redirect to user sign up.
  test "should create authentication" do
    assert_difference('Authentication.count') do
      post :create, authentication: @authentication.attributes
    end

    assert_redirected_to authentications_path
  end

  # TODO: Remove
  # test "should show authentication" do
  #   get :show, id: @authentication.to_param
  #   assert_response :success
  # end

  # TODO: Remove
  # test "should get edit" do
  #   get :edit, id: @authentication.to_param
  #   assert_response :success
  # end

  # TODO: Remove
  # test "should update authentication" do
  #   put :update, id: @authentication.to_param, authentication: @authentication.attributes
  #   assert_redirected_to authentication_path(assigns(:authentication))
  # end

  test "should destroy authentication" do
    assert_difference('Authentication.count', -1) do
      delete :destroy, id: @authentication.to_param
    end

    assert_redirected_to authentications_path
  end
end

Version data entries

83 entries across 83 versions & 1 rubygems

Version Path
contour-2.1.0.beta17 test/controllers/authentications_controller_test.rb
contour-2.1.0.beta16 test/controllers/authentications_controller_test.rb
contour-2.1.0.beta15 test/controllers/authentications_controller_test.rb
contour-2.1.0.beta14 test/controllers/authentications_controller_test.rb
contour-2.1.0.beta13 test/controllers/authentications_controller_test.rb
contour-2.1.0.beta12 test/controllers/authentications_controller_test.rb
contour-2.1.0.beta11 test/controllers/authentications_controller_test.rb
contour-2.1.0.beta10 test/controllers/authentications_controller_test.rb
contour-2.1.0.beta9 test/controllers/authentications_controller_test.rb
contour-2.1.0.beta8 test/controllers/authentications_controller_test.rb
contour-2.1.0.beta7 test/controllers/authentications_controller_test.rb
contour-2.1.0.beta6 test/controllers/authentications_controller_test.rb
contour-2.1.0.beta5 test/controllers/authentications_controller_test.rb
contour-2.1.0.beta4 test/controllers/authentications_controller_test.rb
contour-2.1.0.beta3 test/controllers/authentications_controller_test.rb
contour-2.1.0.beta2 test/controllers/authentications_controller_test.rb
contour-2.1.0.beta1 test/controllers/authentications_controller_test.rb
contour-2.0.0 test/controllers/authentications_controller_test.rb
contour-2.0.0.rc6 test/controllers/authentications_controller_test.rb
contour-2.0.0.rc5 test/controllers/authentications_controller_test.rb