Merge branch 'main' into task/refactor-comment-controller

This commit is contained in:
Andreas Nedbal 2023-10-29 21:54:32 +01:00 committed by GitHub
commit 80b0df1ddd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true
class ReactionController < ApplicationController
class ReactionsController < ApplicationController
def index
answer = Answer.includes([smiles: { user: :profile }]).find(params[:id])

View File

@ -155,7 +155,7 @@ Rails.application.routes.draw do
post "/@:username/a/:id/pin", to: "answer#pin", as: :pin_answer
delete "/@:username/a/:id/pin", to: "answer#unpin", as: :unpin_answer
get "/@:username/a/:id/comments", to: "comments#index", as: :comments
get "/@:username/a/:id/reactions", to: "reaction#index", as: :reactions
get "/@:username/a/:id/reactions", to: "reactions#index", as: :reactions
get "/@:username/q/:id", to: "question#show", as: :question
get "/@:username/c/:id/reactions", to: "comments/reactions#index", as: :comment_reactions
get "/@:username/followers", to: "user#followers", as: :show_user_followers

View File

@ -2,12 +2,12 @@
require "rails_helper"
describe ReactionController, type: :controller do
describe ReactionsController, type: :controller do
describe "#index" do
shared_examples_for "succeeds" do
it "returns the correct response" do
subject
expect(response).to have_rendered("reaction/index")
expect(response).to have_rendered :index
expect(response).to have_http_status(200)
end
end