Sha256: d9ae8188eac79a13fb7c3a33dca99b4c8636dc7ce4f75b787b4295d9ce1dd540

Contents?: true

Size: 745 Bytes

Versions: 15

Compression:

Stored size: 745 Bytes

Contents

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

class SessionTest < ActiveSupport::TestCase
  def setup
    @session = Session.new email: 'costan@gmail.com', password: 'secret'
  end

  test 'setup' do
    assert @session.valid?
  end

  test 'from_params with raw values' do
    session = Session.from_params email: 'costan@gmail.com', password: 'secret'

    assert_equal 'costan@gmail.com', session.email
    assert_equal 'secret', session.password
  end

  test 'from_params with object' do
    session = Session.from_params session: { email: 'costan@gmail.com',
                                             password: 'secret' }

    assert_equal 'costan@gmail.com', session.email
    assert_equal 'secret', session.password
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
authpwn_rails-0.20.0 test/session_test.rb
authpwn_rails-0.19.0 test/session_test.rb
authpwn_rails-0.18.2 test/session_test.rb
authpwn_rails-0.18.1 test/session_test.rb
authpwn_rails-0.18.0 test/session_test.rb
authpwn_rails-0.17.2 test/session_test.rb
authpwn_rails-0.17.1 test/session_test.rb
authpwn_rails-0.17.0 test/session_test.rb
authpwn_rails-0.16.2 test/session_test.rb
authpwn_rails-0.16.1 test/session_test.rb
authpwn_rails-0.16.0 test/session_test.rb
authpwn_rails-0.15.3 test/session_test.rb
authpwn_rails-0.15.2 test/session_test.rb
authpwn_rails-0.15.1 test/session_test.rb
authpwn_rails-0.15.0 test/session_test.rb