diff options
author | Nihad Abbasov <narkoz.2008@gmail.com> | 2012-09-12 05:11:56 -0700 |
---|---|---|
committer | Nihad Abbasov <narkoz.2008@gmail.com> | 2012-09-12 05:11:56 -0700 |
commit | b6f249dc1f4b1867f8f16a23b30f65f4be8e7fd7 (patch) | |
tree | e3d0c6d07fefacf2c4b0bfefed9488a0d8ac0aab /spec/requests/api/issues_spec.rb | |
parent | a87c268f7d3b083534a76065040aa78744c46862 (diff) | |
download | gitlab-ce-b6f249dc1f4b1867f8f16a23b30f65f4be8e7fd7.tar.gz |
make API specs more organized and readable
Diffstat (limited to 'spec/requests/api/issues_spec.rb')
-rw-r--r-- | spec/requests/api/issues_spec.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/requests/api/issues_spec.rb b/spec/requests/api/issues_spec.rb index 293ea83ae6c..442e9c730dc 100644 --- a/spec/requests/api/issues_spec.rb +++ b/spec/requests/api/issues_spec.rb @@ -9,12 +9,14 @@ describe Gitlab::API do before { project.add_access(user, :read) } describe "GET /issues" do - it "should return authentication error" do - get api("/issues") - response.status.should == 401 + context "when unauthenticated" do + it "should return authentication error" do + get api("/issues") + response.status.should == 401 + end end - describe "authenticated GET /issues" do + context "when authenticated" do it "should return an array of issues" do get api("/issues", user) response.status.should == 200 |