Sha256: 2848228488a92945c453c525e4ac7efaf6490bc920638f00fabf940a10f7e8a5

Contents?: true

Size: 1.07 KB

Versions: 14

Compression:

Stored size: 1.07 KB

Contents

require './test/test_helper'

class MemberTest < Minitest::Test

  def test_member_show_success
    VCR.use_cassette('member/show_success') do
      request = Access::Member.show '226872', program_id: '2412', api_environment: 'stage'
      assert request.success
      assert_kind_of Access::MemberResponse, request
      assert_kind_of Hash, request.response
    end
  end

  def test_member_show_failure
    VCR.use_cassette('member/show_failure') do
      request = Access::Member.show '12345', program_id: '00112233', api_environment: 'stage'
      assert_equal 404, request.status
      assert_kind_of Access::MemberResponse, request
      assert_kind_of Hash, request.response
    end
  end

  def test_member_update
    VCR.use_cassette('member/update_success') do
      request = Access::Member.update '226872', program_id: '2412', api_environment: 'stage', birth_date: '2016-01-01'
      assert request.success
      assert_kind_of Access::MemberResponse, request
      assert_kind_of Hash, request.response
      assert_equal request.response["birth_date"], '2016-01-01'
    end
  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
access-2.2.0 test/access/member_test.rb
access-2.1.5 test/access/member_test.rb
access-2.1.4 test/access/member_test.rb
access-2.1.3 test/access/member_test.rb
access-2.1.2 test/access/member_test.rb
access-2.1.1 test/access/member_test.rb
access-2.1.0 test/access/member_test.rb
access-2.0.55 test/access/member_test.rb
access-2.0.54 test/access/member_test.rb
access-2.0.53 test/access/member_test.rb
access-2.0.52 test/access/member_test.rb
access-2.0.51 test/access/member_test.rb
access-2.0.50 test/access/member_test.rb
access-2.0.49 test/access/member_test.rb