* views/stories and home related i18n * PR key names fixes * remove ja.yml * Update en.yml * Update fr.yml * Update articles_search_spec.rb * Update _meta.html.erb * Update index.html.erb * Update _meta.html.erb * Update articles_search_spec.rb text in HTML should not contain raw brackets * Update articles_search_spec.rb * Update _signup_modal.html.erb * Add back missing Search text Co-authored-by: Fernando Valverde <fernando@visualcosita.com>
24 lines
673 B
Ruby
24 lines
673 B
Ruby
require "rails_helper"
|
|
|
|
RSpec.describe "Stories::ArticlesSearchController", type: :request do
|
|
describe "GET query page" do
|
|
it "renders page with proper header" do
|
|
get "/search?q=hello"
|
|
expect(response.body).to include(CGI.escapeHTML("=> Search Results"))
|
|
end
|
|
|
|
context "with non-empty query" do
|
|
it "renders search term in page title" do
|
|
get "/search?q=hello"
|
|
expect(response.body).to include("Search results for hello")
|
|
end
|
|
end
|
|
|
|
context "with empty query" do
|
|
it "renders default page title" do
|
|
get "/search?q="
|
|
expect(response.body).to include("Search results")
|
|
end
|
|
end
|
|
end
|
|
end
|