test/test_requestable.rb in myjohndeere-0.1.4 vs test/test_requestable.rb in myjohndeere-0.1.5
- old
+ new
@@ -10,6 +10,17 @@
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
\ No newline at end of file