Class: DevicesTest
- Inherits:
-
Test::Unit::TestCase
- Object
- Test::Unit::TestCase
- DevicesTest
- Defined in:
- lib/ost-sdk-ruby/test/devices_test.rb
Instance Method Summary collapse
- #devices_service ⇒ Object
- #test_devices_create ⇒ Object
- #test_devices_get ⇒ Object
- #test_devices_get_list ⇒ Object
Instance Method Details
#devices_service ⇒ Object
8 9 10 |
# File 'lib/ost-sdk-ruby/test/devices_test.rb', line 8 def devices_service @devices_service ||= Config::OST_SDK.services.devices end |
#test_devices_create ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/ost-sdk-ruby/test/devices_test.rb', line 12 def test_devices_create result = devices_service.create({ user_id: Config::OST_KIT_USER_ID, address: "0x1ea365269a3e6c8fa492eca9a531bf#{Time.now.to_i}", api_signer_address: '0x5F860598383868e8E8Ee0ffC5ADD92369Db37455' }) puts "result=>#{result}" unless result["success"] assert_equal(result["success"], true) end |
#test_devices_get ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/ost-sdk-ruby/test/devices_test.rb', line 22 def test_devices_get result = devices_service.get({ user_id: Config::OST_KIT_USER_ID, device_address: Config::OST_KIT_USER_DEVICE_ADDRESS }) puts "result=>#{result}" unless result["success"] assert_equal(result["success"], true) end |
#test_devices_get_list ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/ost-sdk-ruby/test/devices_test.rb', line 31 def test_devices_get_list result = devices_service.get_list({ user_id: Config::OST_KIT_USER_ID }) puts "result=>#{result}" unless result["success"] assert_equal(result["success"], true) end |