         keys = gitlab.user.sshkeys
         expect(keys.backboneClass).toEqual("SSHKeys")
         expect(keys.length).toBe(0)
+      )
+    )
+  )
+
+  # GitLab.Keys
+  # ----------------------------------------------------------------
+
+  describe("Keys", ->
+
+    keys = null
+    beforeEach(-> keys = new GitLab.Keys()
+
+    describe("fetch()", ->
+      it("should call correct URL", ->
+        spyOnAjax()
+        keys.fetch()
+        expect(lastAjaxCall().args[0].type).toEqual("GET")
+        expect(lastAjaxCall().args[0].url).toEqual(url + "/user/keys")
+      )
+    )
+
+    describe("create()", ->
+      it("should call the correct URL", ->
+        spyOnAjax()
+        members.create(key:"Something")
+        expect(lastAjaxCall().args[0].type).toEqual("POST")
+        expect(lastAjaxCall().args[0].url).toEqual(url + "/user/keys")
       )
     )
   )

        masterBlob.set("id", 1)
        expect(masterBlob.defaultCommitMessage()).toEqual("Updated subfolder/master.txt")
      )
    )

    describe("save()", ->

#
# The AJAX helpers can of course be mixes with Jasmine's asynchronous helpers, as seen in the tests
# below.
#

# TODO
# MAKE SURE THAT ALL ASSOCIATIONS HAVE MINIMUM OF DATA TO DO STUFF
# CHECK THAT ALL MODELS THAT REWUIRE BRANCHES FAIL WHEN NOT PASSED IN
# make sure that the trees api returns full path in blob names when listing a subfolder. Otherwise blob.get("name") logic is wrong.
# MAKE SURE ALL THE ?file_path is in data instead!!!

ajaxTimeout = 1000
token = "abcdefg"
