Sha256: 55d440b4693ad85d2a3de7ab48da72f880076d2befa2b5deddf6868f9e0f56ad

Contents?: true

Size: 824 Bytes

Versions: 1

Compression:

Stored size: 824 Bytes

Contents

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

class EventTest < Jibeset::Test
  
  def setup
    @jibeset = Jibeset.client
    @jibeset.stubs = Faraday::Adapter::Test::Stubs.new
  end

  def test_events_should_return_events
    @jibeset.stubs.get('/events.json') { [200, {}, '{"events":[]}'] } 
    refute_nil @jibeset.events
  end

  def test_event_entries_should_return_entries

  end

  def test_create_event_should_create_event
    payload = { :name => 'tybee', :event_type => 'series' }
    @jibeset.stubs.post('/events.json')  { [200,{},Yajl.dump(payload)] }
    client = @jibeset.create_event(payload)
    
    assert_equal Yajl.dump(payload), client
  end

  def test_update_event_should_update_event

  end

  def test_destroy_event_should_destroy_event

  end

  def test_register_entry

  end


end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jibeset-0.2 test/jibeset/client/events_test.rb