this is my controller
class NewsController < ApplicationController
def show
@news = News.find_by id: params[:id]
end
end
this is views
json.extract! @news ,:id, :title , :content , :created_at , :updated_at
json.image @news.images do |image|
json.url url_for(image)
end
what is right way of testing this controller and views. I'am new into testing so i'am little bit frustrated with this