mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 10:09:53 +01:00
Merge branch 'main' into task/refactor-comment-controller
This commit is contained in:
commit
80b0df1ddd
4 changed files with 4 additions and 4 deletions
|
@ -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])
|
||||
|
|
@ -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
|
||||
|
|
|
@ -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
|
Loading…
Reference in a new issue