Sha256: 41f0295e505f7400af9c1033b1aa85ee6fb7dada63623d231a3bb10d2ff7c41c
Contents?: true
Size: 736 Bytes
Versions: 7
Compression:
Stored size: 736 Bytes
Contents
require File.expand_path('../test_helper', __FILE__) class TestAccessToken < Minitest::Test def test_initialization assert MyJohnDeere::Requestable.new() expected_object = default_access_token() requestable = MyJohnDeere::Requestable.new({}, expected_object) assert_equal expected_object, requestable.access_token assert_raises ArgumentError do MyJohnDeere::Requestable.new({}, "something") end end def test_has_access_to r = MyJohnDeere::Requestable.new({"links" => [ { "rel" => "addresses", "uri" => "https://sandboxapi.deere.com/platform/organizations/1234/addresses" }]}) assert r.has_access_to?("addresses") assert !r.has_access_to?("something_else") end end
Version data entries
7 entries across 7 versions & 1 rubygems