spec/lib/smooth/api_spec.rb in smooth-2.0.1 vs spec/lib/smooth/api_spec.rb in smooth-2.0.2

- old
+ new

@@ -17,7 +17,15 @@ end it "should have a version" do expect(api.version).to equal(:v1) end + + it "should lookup objects by a shortcut alias / path" do + expect(api.lookup_object_by("books")).to be_a(Smooth::Resource) + expect(api.lookup_object_by("books.create")).to eq(CreateBook) + expect(api.lookup_object_by("books.like")).to eq(LikeBook) + expect(api.lookup_object_by("books.query")).to eq(BookQuery) + expect(api.lookup_object_by("books.serializer")).to eq(BookSerializer) + end end