diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-13 14:29:26 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-13 14:29:26 +0300 |
commit | d593c98fcbd34789068a72c9386f69a152107139 (patch) | |
tree | e660dedb0ce4a97b9122e9debb5f3f5f32abf10e /spec | |
parent | 1355ede49d02e2a7b1715a3ed6bd7389bfedf6bc (diff) | |
download | gitlab-ce-d593c98fcbd34789068a72c9386f69a152107139.tar.gz |
Delete wall notes tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/security/project/internal_access_spec.rb | 11 | ||||
-rw-r--r-- | spec/features/security/project/private_access_spec.rb | 11 | ||||
-rw-r--r-- | spec/features/security/project/public_access_spec.rb | 11 | ||||
-rw-r--r-- | spec/mailers/notify_spec.rb | 16 | ||||
-rw-r--r-- | spec/requests/api/notes_spec.rb | 50 | ||||
-rw-r--r-- | spec/requests/api/projects_spec.rb | 2 | ||||
-rw-r--r-- | spec/routing/project_routing_spec.rb | 5 | ||||
-rw-r--r-- | spec/services/projects/create_service_spec.rb | 2 |
8 files changed, 0 insertions, 108 deletions
diff --git a/spec/features/security/project/internal_access_spec.rb b/spec/features/security/project/internal_access_spec.rb index eb8422df599..f86b3db32eb 100644 --- a/spec/features/security/project/internal_access_spec.rb +++ b/spec/features/security/project/internal_access_spec.rb @@ -87,17 +87,6 @@ describe "Internal Project Access", feature: true do it { should be_denied_for :visitor } end - describe "GET /:project_path/wall" do - subject { project_wall_path(project) } - - it { should be_allowed_for master } - it { should be_allowed_for reporter } - it { should be_allowed_for :admin } - it { should be_allowed_for guest } - it { should be_allowed_for :user } - it { should be_denied_for :visitor } - end - describe "GET /:project_path/blob" do before do commit = project.repository.commit diff --git a/spec/features/security/project/private_access_spec.rb b/spec/features/security/project/private_access_spec.rb index 186ad350469..a27361f4d15 100644 --- a/spec/features/security/project/private_access_spec.rb +++ b/spec/features/security/project/private_access_spec.rb @@ -87,17 +87,6 @@ describe "Private Project Access", feature: true do it { should be_denied_for :visitor } end - describe "GET /:project_path/wall" do - subject { project_wall_path(project) } - - it { should be_allowed_for master } - it { should be_allowed_for reporter } - it { should be_allowed_for :admin } - it { should be_denied_for guest } - it { should be_denied_for :user } - it { should be_denied_for :visitor } - end - describe "GET /:project_path/blob" do before do commit = project.repository.commit diff --git a/spec/features/security/project/public_access_spec.rb b/spec/features/security/project/public_access_spec.rb index f5d1cf7b971..f114965bd4a 100644 --- a/spec/features/security/project/public_access_spec.rb +++ b/spec/features/security/project/public_access_spec.rb @@ -92,17 +92,6 @@ describe "Public Project Access", feature: true do it { should be_denied_for :visitor } end - describe "GET /:project_path/wall" do - subject { project_wall_path(project) } - - it { should be_allowed_for master } - it { should be_allowed_for reporter } - it { should be_allowed_for :admin } - it { should be_allowed_for guest } - it { should be_allowed_for :user } - it { should be_allowed_for :visitor } - end - describe "GET /:project_path/blob" do before do commit = project.repository.commit diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb index 32ba6c9b863..453bf2b3e94 100644 --- a/spec/mailers/notify_spec.rb +++ b/spec/mailers/notify_spec.rb @@ -410,22 +410,6 @@ describe Notify do end end - describe 'on a project wall' do - let(:note_on_the_wall_path) { project_wall_path(project, anchor: "note_#{note.id}") } - - subject { Notify.note_wall_email(recipient.id, note.id) } - - it_behaves_like 'a note email' - - it 'has the correct subject' do - should have_subject /#{project.name}/ - end - - it 'contains a link to the wall note' do - should have_body_text /#{note_on_the_wall_path}/ - end - end - describe 'on a commit' do let(:commit) { project.repository.commit } 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 diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb index 81e6abbb0d7..43915d8684b 100644 --- a/spec/requests/api/projects_spec.rb +++ b/spec/requests/api/projects_spec.rb @@ -126,7 +126,6 @@ describe API::API, api: true do project = attributes_for(:project, { description: Faker::Lorem.sentence, issues_enabled: false, - wall_enabled: false, merge_requests_enabled: false, wiki_enabled: false }) @@ -208,7 +207,6 @@ describe API::API, api: true do project = attributes_for(:project, { description: Faker::Lorem.sentence, issues_enabled: false, - wall_enabled: false, merge_requests_enabled: false, wiki_enabled: false }) diff --git a/spec/routing/project_routing_spec.rb b/spec/routing/project_routing_spec.rb index fa9762625d7..4b2eb42c709 100644 --- a/spec/routing/project_routing_spec.rb +++ b/spec/routing/project_routing_spec.rb @@ -56,7 +56,6 @@ end # projects POST /projects(.:format) projects#create # new_project GET /projects/new(.:format) projects#new # fork_project POST /:id/fork(.:format) projects#fork -# wall_project GET /:id/wall(.:format) projects#wall # files_project GET /:id/files(.:format) projects#files # edit_project GET /:id/edit(.:format) projects#edit # project GET /:id(.:format) projects#show @@ -75,10 +74,6 @@ describe ProjectsController, "routing" do post("/gitlab/gitlabhq/fork").should route_to('projects#fork', id: 'gitlab/gitlabhq') end - it "to #wall" do - get("/gitlab/gitlabhq/wall").should route_to('projects/walls#show', project_id: 'gitlab/gitlabhq') - end - it "to #edit" do get("/gitlab/gitlabhq/edit").should route_to('projects#edit', id: 'gitlab/gitlabhq') end diff --git a/spec/services/projects/create_service_spec.rb b/spec/services/projects/create_service_spec.rb index 38aae452c3c..0eac6bed74b 100644 --- a/spec/services/projects/create_service_spec.rb +++ b/spec/services/projects/create_service_spec.rb @@ -65,7 +65,6 @@ describe Projects::CreateService do @settings.stub(:issues) { true } @settings.stub(:merge_requests) { true } @settings.stub(:wiki) { true } - @settings.stub(:wall) { true } @settings.stub(:snippets) { true } stub_const("Settings", Class.new) @restrictions = double("restrictions") @@ -108,7 +107,6 @@ describe Projects::CreateService do @settings.stub(:issues) { true } @settings.stub(:merge_requests) { true } @settings.stub(:wiki) { true } - @settings.stub(:wall) { true } @settings.stub(:snippets) { true } @settings.stub(:visibility_level) { Gitlab::VisibilityLevel::PRIVATE } stub_const("Settings", Class.new) |