Sha256: c8ad3a77adf3c12c6cb57c4ce6867b73e669187a8e65bb3dca41e3aed7798d62

Contents?: true

Size: 915 Bytes

Versions: 7

Compression:

Stored size: 915 Bytes

Contents

require 'test/unit'

class TC_Session < Test::Unit::TestCase
  def setup
    Entities.delete_all_data
    @admin = Entities.Persons.create( :first_name => "admin", :pass => "super123",
    :address => "cdlf 24", :credit => 10000 )
    Entities.Courses.create( :first_name => "base_1010", :start => "1.10.2010")
    Entities.Courses.create( :first_name => "base_1011", :start => "1.11.2010")
    @dummies_one = Entities.Dummies.create( :first_name => "one", :phone => "111",
    :no_cache => "123" )
  end

  def teardown
  end

  def test_new_session
    session = Sessions.create( @admin )
    dputs( 1 ){ "#{session.inspect}" }
    assert_equal @admin.session_id, session.sid
    assert_equal "admin", session.owner.first_name
    
    search = Sessions.match_by_sid( session.sid )
    assert_equal session.sid, search.sid
    
    search.close
    assert_equal nil, Sessions.match_by_sid( session.sid )
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
qooxview-1.9.1312 test/qv_session.rb
qooxview-1.9.13.pre.12 test/qv_session.rb
qooxview-1.9.13.pre.11 test/qv_session.rb
qooxview-1.9.13.pre.10 test/qv_session.rb
qooxview-1.9.11 test/qv_session.rb
qooxview-1.9.10 test/qv_session.rb
qooxview-1.9.9 test/qv_session.rb