mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 22:47:46 +08:00
FEATURE: add help text for no bookmarks in user page
This commit is contained in:
@ -24,6 +24,28 @@ describe UserActionsController do
|
||||
expect(action["post_number"]).to eq(1)
|
||||
end
|
||||
|
||||
it 'renders help text if provided for self' do
|
||||
logged_in = log_in
|
||||
|
||||
xhr :get, :index, filter: UserAction::LIKE, username: logged_in.username, no_results_help_key: "user_activity.no_bookmarks"
|
||||
|
||||
expect(response.status).to eq(200)
|
||||
parsed = JSON.parse(response.body)
|
||||
|
||||
expect(parsed["no_results_help"]).to eq(I18n.t("user_activity.no_bookmarks.self"))
|
||||
|
||||
end
|
||||
|
||||
it 'renders help text for others' do
|
||||
user = Fabricate(:user)
|
||||
xhr :get, :index, filter: UserAction::LIKE, username: user.username, no_results_help_key: "user_activity.no_bookmarks"
|
||||
|
||||
expect(response.status).to eq(200)
|
||||
parsed = JSON.parse(response.body)
|
||||
|
||||
expect(parsed["no_results_help"]).to eq(I18n.t("user_activity.no_bookmarks.other"))
|
||||
end
|
||||
|
||||
context "queued posts" do
|
||||
context "without access" do
|
||||
let(:user) { Fabricate(:user) }
|
||||
|
Reference in New Issue
Block a user