         expect(hydrator.isResourceLink hash).to.be.false
 
 
+    describe "#isSearchOption", ->
+
+      it "should match only valid search rel attributes", ->
+        hydrator = do getHydrator
+        expect(hydrator.isSearchOption "api/search").to.be.true
+        expect(hydrator.isSearchOption "apisearch").to.be.false
+        expect(hydrator.isSearchOption "api/search!").to.be.false
+
+      it "should treat leading slash as an error", ->
+        hydrator = do getHydrator
+        expect(hydrator.isSearchOption "api/search/").to.be.false
+
+
     describe "#isSpecialObject", ->
-      hydrator = do getDeHydrator
-
-      it '''should return true if current xpath points to special object
-      contents (resource link) and node is a resource link''', ->
+
+      it "should return true if current xpath points to special object " +
+      "contents (resource link) and node is a resource link", ->
         hydrator = getDeHydrator
           isResourceLink: yes, _isSpecialObjectXPath: yes
         expect(do hydrator.isSpecialObject).to.be.true

      attrs = rel: "SPAM"
      hash[ATTRKEY] = attrs

      it.skip '''should return true if is link with rel attribute and href
      doesn't point to resource''', ->
        hydrator = getDeHydrator
          isLink: yes, _isResourceHref: no, _getAttributes: rel: '/rel'
        expect(hydrator.isCollectionLink hash).to.be.true

      expect(-> hydrator.unfolded "not an object").to.not.throw Error


  describe "Detection of different node types", ->

    describe "#isLink", ->
      hydrator = do getHydrator
