summaryrefslogtreecommitdiff
path: root/spec/requests/api/groups_spec.rb
diff options
context:
space:
mode:
authorAndrey Kumanyaev <me@zzet.org>2013-03-21 01:46:30 +0400
committerAndrey Kumanyaev <me@zzet.org>2013-05-05 18:02:02 +0400
commitb1b354b0f86daae9a2cf19869dd3e6cb2d9ffd5e (patch)
tree237608f2f66462280134f7bf6f4e9ba8b571bfa0 /spec/requests/api/groups_spec.rb
parent67ccc8b52aceebea9c0cb22b3277daf0b467c78e (diff)
downloadgitlab-ce-b1b354b0f86daae9a2cf19869dd3e6cb2d9ffd5e.tar.gz
remove trailing spaces
Diffstat (limited to 'spec/requests/api/groups_spec.rb')
-rw-r--r--spec/requests/api/groups_spec.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/requests/api/groups_spec.rb b/spec/requests/api/groups_spec.rb
index 37199835d53..cf284b607a5 100644
--- a/spec/requests/api/groups_spec.rb
+++ b/spec/requests/api/groups_spec.rb
@@ -26,7 +26,7 @@ describe Gitlab::API do
json_response.first['name'].should == group1.name
end
end
-
+
context "when authenticated as admin" do
it "admin: should return an array of all groups" do
get api("/groups", admin)
@@ -36,7 +36,7 @@ describe Gitlab::API do
end
end
end
-
+
describe "GET /groups/:id" do
context "when authenticated as user" do
it "should return one of user1's groups" do
@@ -44,32 +44,32 @@ describe Gitlab::API do
response.status.should == 200
json_response['name'] == group1.name
end
-
+
it "should not return a non existing group" do
get api("/groups/1328", user1)
response.status.should == 404
end
-
+
it "should not return a group not attached to user1" do
get api("/groups/#{group2.id}", user1)
response.status.should == 404
end
end
-
+
context "when authenticated as admin" do
it "should return any existing group" do
get api("/groups/#{group2.id}", admin)
response.status.should == 200
json_response['name'] == group2.name
end
-
+
it "should not return a non existing group" do
get api("/groups/1328", admin)
response.status.should == 404
end
end
end
-
+
describe "POST /groups" do
context "when authenticated as user" do
it "should not create group" do
@@ -77,7 +77,7 @@ describe Gitlab::API do
response.status.should == 403
end
end
-
+
context "when authenticated as admin" do
it "should create group" do
post api("/groups", admin), attributes_for(:group)
@@ -104,8 +104,8 @@ describe Gitlab::API do
describe "POST /groups/:id/projects/:project_id" do
let(:project) { create(:project) }
before(:each) do
- project.stub!(:transfer).and_return(true)
- Project.stub(:find).and_return(project)
+ project.stub!(:transfer).and_return(true)
+ Project.stub(:find).and_return(project)
end