Sha256: dfb2c748e8df790e4900d8e512533ec573e55168b303590dd1bba8a54e26c600

Contents?: true

Size: 1.45 KB

Versions: 14

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

14 entries across 14 versions & 1 rubygems

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