Commit 1bae64d7f608e3d68d52fd59755216db6c70f7f4

Authored by Nihad Abbasov
1 parent b6244581

whitespace

Showing 1 changed file with 4 additions and 0 deletions   Show diff stats
spec/requests/api/users_spec.rb
... ... @@ -47,6 +47,7 @@ describe Gitlab::API do
47 47 response.status.should == 401
48 48 end
49 49 end
  50 +
50 51 context "when authenticated" do
51 52 it "should return array of ssh keys" do
52 53 user.keys << key
... ... @@ -67,6 +68,7 @@ describe Gitlab::API do
67 68 response.status.should == 200
68 69 json_response["title"].should == key.title
69 70 end
  71 +
70 72 it "should return 404 Not Found within invalid ID" do
71 73 get api("/user/keys/42", user)
72 74 response.status.should == 404
... ... @@ -78,6 +80,7 @@ describe Gitlab::API do
78 80 post api("/user/keys", user), { title: "invalid key" }
79 81 response.status.should == 404
80 82 end
  83 +
81 84 it "should create ssh key" do
82 85 key_attrs = Factory.attributes :key
83 86 expect {
... ... @@ -94,6 +97,7 @@ describe Gitlab::API do
94 97 delete api("/user/keys/#{key.id}", user)
95 98 }.to change{user.keys.count}.by(-1)
96 99 end
  100 +
97 101 it "should return 404 Not Found within invalid ID" do
98 102 delete api("/user/keys/42", user)
99 103 response.status.should == 404
... ...