Sha256: e47bea049501b27393f65ebf231fbe130deba9667a18f183dd6b95ef3070b5e5

Contents?: true

Size: 1.45 KB

Versions: 8

Compression:

Stored size: 1.45 KB

Contents

require './test/test_helper'

class DeviceTest < Minitest::Test

  def test_device_search_success
    VCR.use_cassette('member device search success') do
      request = Access::Device.search '226872', program_id: '2412', api_environment: 'stage'
      assert request.success
      assert_kind_of Access::DeviceResponse, request
      assert_kind_of Hash, request.response
    end
  end

  def test_device_search_failure
    VCR.use_cassette('member device search failure') do
      request = Access::Device.search '12345', program_id: '00112233', api_environment: 'stage'
      assert_equal 404, request.status
      assert_kind_of Access::DeviceResponse, request
      assert_kind_of Hash, request.response
    end
  end

  def test_device_find_success
    skip
    VCR.use_cassette('member device find success') do
      request = Access::Device.search '226872', udid: 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX', program_id: '2412', api_environment: 'stage'
      assert request.success
      assert_kind_of Access::DeviceResponse, request
      assert_kind_of Hash, request.response
    end
  end

  def test_device_find_failure
    skip
    VCR.use_cassette('member device find failure') do
      request = Access::Device.search '226872', udid: 'YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY', program_id: '2412', api_environment: 'stage'
      assert_equal 404, request.status
      assert_kind_of Access::DeviceResponse, request
      assert_kind_of Hash, request.response
    end
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
access-2.0.48 test/access/device_test.rb
access-2.0.47 test/access/device_test.rb
access-2.0.46 test/access/device_test.rb
access-2.0.44 test/access/device_test.rb
access-2.0.43 test/access/device_test.rb
access-2.0.42 test/access/device_test.rb
access-2.0.41 test/access/device_test.rb
access-2.0.40 test/access/device_test.rb