Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-06-13 15:29:26 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-06-13 15:29:26 +0400
commitd593c98fcbd34789068a72c9386f69a152107139 (patch)
treee660dedb0ce4a97b9122e9debb5f3f5f32abf10e /spec/requests/api/notes_spec.rb
parent1355ede49d02e2a7b1715a3ed6bd7389bfedf6bc (diff)
Delete wall notes tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/requests/api/notes_spec.rb')
-rw-r--r--spec/requests/api/notes_spec.rb50
1 files changed, 0 insertions, 50 deletions
diff --git a/spec/requests/api/notes_spec.rb b/spec/requests/api/notes_spec.rb
index 81576f7c235..11796183474 100644
--- a/spec/requests/api/notes_spec.rb
+++ b/spec/requests/api/notes_spec.rb
@@ -13,58 +13,8 @@ describe API::API, api: true do
let!(:issue_note) { create(:note, noteable: issue, project: project, author: user) }
let!(:merge_request_note) { create(:note, noteable: merge_request, project: project, author: user) }
let!(:snippet_note) { create(:note, noteable: snippet, project: project, author: user) }
- let!(:wall_note) { create(:note, project: project, author: user) }
before { project.team << [user, :reporter] }
- describe "GET /projects/:id/notes" do
- context "when unauthenticated" do
- it "should return authentication error" do
- get api("/projects/#{project.id}/notes")
- response.status.should == 401
- end
- end
-
- context "when authenticated" do
- it "should return project wall notes" do
- get api("/projects/#{project.id}/notes", user)
- response.status.should == 200
- json_response.should be_an Array
- json_response.first['body'].should == wall_note.note
- end
- end
- end
-
- describe "GET /projects/:id/notes/:note_id" do
- it "should return a wall note by id" do
- get api("/projects/#{project.id}/notes/#{wall_note.id}", user)
- response.status.should == 200
- json_response['body'].should == wall_note.note
- end
-
- it "should return a 404 error if note not found" do
- get api("/projects/#{project.id}/notes/123", user)
- response.status.should == 404
- end
- end
-
- describe "POST /projects/:id/notes" do
- it "should create a new wall note" do
- post api("/projects/#{project.id}/notes", user), body: 'hi!'
- response.status.should == 201
- json_response['body'].should == 'hi!'
- end
-
- it "should return 401 unauthorized error" do
- post api("/projects/#{project.id}/notes")
- response.status.should == 401
- end
-
- it "should return a 400 bad request if body is missing" do
- post api("/projects/#{project.id}/notes", user)
- response.status.should == 400
- end
- end
-
describe "GET /projects/:id/noteable/:noteable_id/notes" do
context "when noteable is an Issue" do
it "should return an array of issue notes" do