Sha256: 67ed607d3b6822838bc993837a8605797513a7e8f9f42803a3e67ae71a51b6e6

Contents?: true

Size: 810 Bytes

Versions: 13

Compression:

Stored size: 810 Bytes

Contents

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

module Payjp
  class EventTest < Test::Unit::TestCase
    should "events should be listable" do
      @mock.expects(:get).once.returns(test_response(test_event_array))
      c = Payjp::Event.all.data
      assert c.is_a? Array
      assert c[0].is_a? Payjp::Event
    end

    should "retrieve should retrieve event" do
      @mock.expects(:get).once.returns(test_response(test_event))
      event = Payjp::Event.retrieve('tr_test_event')
      assert_equal 'evnt_test_event', event.id
    end

    should "events should not be deletable" do
      assert_raises NoMethodError do
        @mock.expects(:get).once.returns(test_response(test_event))
        event = Payjp::Event.retrieve('evnt_test_event')
        event.delete
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
payjp-0.0.16 test/payjp/event_test.rb
payjp-0.0.14 test/payjp/event_test.rb
payjp-0.0.13 test/payjp/event_test.rb
payjp-0.0.12 test/payjp/event_test.rb
payjp-0.0.10 test/payjp/event_test.rb
payjp-0.0.9 test/payjp/event_test.rb
payjp-0.0.8 test/payjp/event_test.rb
payjp-0.0.7 test/payjp/event_test.rb
payjp-0.0.6 test/payjp/event_test.rb
payjp-0.0.5 test/payjp/event_test.rb
payjp-0.0.4 test/payjp/event_test.rb
payjp-0.0.3 test/payjp/event_test.rb
payjp-0.0.2 test/payjp/event_test.rb