Sha256: 5d16dbd9d1ca529c4182f2532333047773cdfdba5ee56ffdfe81d7e5c02ba3c2

Contents?: true

Size: 830 Bytes

Versions: 4

Compression:

Stored size: 830 Bytes

Contents

require File.dirname(__FILE__) + '/../test_helper'

class RemoteCampfireTest < Test::Unit::TestCase
  
  def setup
    @campfire = Tinder::Campfire.new 'opensoul'
    @user, @pass = 'brandon@opensoul.org', 'testing'
  end
  
  def test_create_and_delete_room
    assert login
    room = @campfire.create_room('Testing123')
    
    assert Tinder::Room, room
    assert_not_nil room.id
    assert_equal "new name", room.rename("new name")
    
    room.destroy
    assert_nil @campfire.find_room_by_name('Testing123')
  end
  
  def test_failed_login
    assert !@campfire.login(@user, 'notmypassword')
  end
  
  def test_find_nonexistent_room
    login
    assert_nil @campfire.find_room_by_name('No Room Should Have This Name')
  end

private

  def login(user = @user, pass = @pass)
    @campfire.login(user, pass)
  end
  
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tinder-0.1.0 test/remote/remote_campfire_test.rb
tinder-0.1.1 test/remote/remote_campfire_test.rb
tinder-0.1.2 test/remote/remote_campfire_test.rb
tinder-0.1.3 test/remote/remote_campfire_test.rb