Remove commented code and tests (#3989) [ci skip]

This commit is contained in:
Jacob Herrington 2019-09-09 13:51:02 -05:00 committed by Mac Siri
parent 1a8132f892
commit 59e7c104f2
8 changed files with 1 additions and 21 deletions

View file

@ -1,7 +1,6 @@
module Api
module V0
class CommentsController < ApiController
# before_action :set_cache_control_headers, only: [:index, :show]
caches_action :index,
cache_path: proc { |c| c.params.permit! },
expires_in: 10.minutes

View file

@ -1,7 +1,6 @@
module Api
module V0
class TagsController < ApplicationController
# before_action :set_cache_control_headers, only: [:index]
caches_action :index,
cache_path: proc { |c| c.params.permit! },
expires_in: 10.minutes

View file

@ -145,7 +145,6 @@ class ChatChannelsController < ApplicationController
@active_channel = ChatChannel.find_by(slug: slug)
@active_channel.current_user = current_user if @active_channel
end
# @github_token = generate_github_token Not yet fully baked, not needed.
generate_algolia_search_key
end

View file

@ -35,11 +35,8 @@ class CommentsController < ApplicationController
# GET /comments/1
# GET /comments/1.json
# def show
# @comment = Comment.find_by_id_code(params[:id_code])
# end
# GET /comments/1/edit
def edit
@comment = Comment.find(params[:id_code].to_i(26))
authorize @comment

View file

@ -75,9 +75,7 @@ class Internal::ArticlesController < Internal::ApplicationController
article.update!(article_params)
Article.where.not(id: article.id).where(live_now: true).update_all(live_now: false) if article.live_now
CacheBuster.new.bust "/live_articles"
# raise
render body: nil
# redirect_to "/internal/articles"
end
private

View file

@ -1,6 +1,5 @@
class Internal::ReactionsController < Internal::ApplicationController
def update
# raise
@reaction = Reaction.find(params[:id])
@reaction.update(status: params[:reaction][:status])
redirect_to "/internal/reports"

View file

@ -389,9 +389,6 @@ RSpec.describe Article, type: :model do
end
describe "before save" do
# before do
# article = create(:article, user_id: user.id)
# end
it "assigns path on save" do
article = create(:article, user_id: user.id)
expect(article.path).to eq("/#{article.username}/#{article.slug}")

View file

@ -11,13 +11,5 @@ RSpec.describe "PusherAuth", type: :request do
}
expect(response.body).to include("Forbidden")
end
# it "returns forbidden with invalid channel" do
# sign_in user
# post "/pusher/auth", params: {
# channel_name: "private-message-notifications-#{user.id}"
# }
# expect(response.body).to include("Forbidden")
# end
end
end