Sha256: a05d2342dd33f606c13d470dc207cf22886c47b887116f032b1a24d9f7ea8ab4

Contents?: true

Size: 1.08 KB

Versions: 7

Compression:

Stored size: 1.08 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: Date.today
      assert request.success
      assert_kind_of Access::MemberResponse, request
      assert_kind_of Hash, request.response
      assert_equal request.response["birth_date"], Date.today.to_s
    end
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
access-2.0.46 test/access/member_test.rb
access-2.0.44 test/access/member_test.rb
access-2.0.43 test/access/member_test.rb
access-2.0.42 test/access/member_test.rb
access-2.0.41 test/access/member_test.rb
access-2.0.40 test/access/member_test.rb
access-2.0.39 test/access/member_test.rb