Sha256: ff06c0d8fb89340f578a6cfaba22f012b6b0e63f966fc563e6e24b9e9530efd6

Contents?: true

Size: 1.45 KB

Versions: 11

Compression:

Stored size: 1.45 KB

Contents

require File.expand_path('../test_helper', __FILE__)

require 'authpwn_rails/generators/templates/session_controller.rb'

# Tests the routes created by authpwn_session.
class RoutesTest < ActionController::TestCase
  tests SessionController

  test "authpwn_session routes" do
    assert_routing({path: "/session", method: :get},
                   {controller: 'session', action: 'show'})
    assert_routing({path: "/session/new", method: :get},
                   {controller: 'session', action: 'new'})
    assert_routing({path: "/session", method: :post},
                   {controller: 'session', action: 'create'})
    assert_routing({path: "/session", method: :delete},
                   {controller: 'session', action: 'destroy'})
    assert_routing({path: "/session", method: :delete},
                   {controller: 'session', action: 'destroy'})
    assert_routing({path: "/session/change_password", method: :get},
                   {controller: 'session', action: 'password_change'})
    assert_routing({path: "/session/change_password", method: :post},
                   {controller: 'session', action: 'change_password'})
    assert_routing({path: "/session/reset_password", method: :post},
                   {controller: 'session', action: 'reset_password'})
    
    code = 'YZ-Fo8HX6_NyU6lVZXYi6cMDLV5eAgt35UTF5l8bD6A'
    assert_routing({path: "/session/token/#{code}", method: :get},
        {controller: 'session', action: 'token', code: code})
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
authpwn_rails-0.16.2 test/routes_test.rb
authpwn_rails-0.16.1 test/routes_test.rb
authpwn_rails-0.16.0 test/routes_test.rb
authpwn_rails-0.15.3 test/routes_test.rb
authpwn_rails-0.15.2 test/routes_test.rb
authpwn_rails-0.15.1 test/routes_test.rb
authpwn_rails-0.15.0 test/routes_test.rb
authpwn_rails-0.14.3 test/routes_test.rb
authpwn_rails-0.14.2 test/routes_test.rb
authpwn_rails-0.14.1 test/routes_test.rb
authpwn_rails-0.14.0 test/routes_test.rb