Sha256: 99cc236ef16d58b6d3cd6574ddcf228406daa3d27e9fbe381bd8e9c3d3ca6ee6

Contents?: true

Size: 723 Bytes

Versions: 5

Compression:

Stored size: 723 Bytes

Contents

require_relative 'test_helper'

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

5 entries across 5 versions & 1 rubygems

Version Path
authpwn_rails-0.23.0 test/session_test.rb
authpwn_rails-0.22.1 test/session_test.rb
authpwn_rails-0.22.0 test/session_test.rb
authpwn_rails-0.21.1 test/session_test.rb
authpwn_rails-0.21.0 test/session_test.rb