FIX: Use correct translation string
This commit is contained in:
parent
d33aaa0292
commit
82b307cd52
|
@ -75,7 +75,7 @@ after_initialize do
|
||||||
poll_groups = poll.groups.split(",").map(&:downcase)
|
poll_groups = poll.groups.split(",").map(&:downcase)
|
||||||
user_groups = user.groups.map { |g| g.name.downcase }
|
user_groups = user.groups.map { |g| g.name.downcase }
|
||||||
if (poll_groups & user_groups).empty?
|
if (poll_groups & user_groups).empty?
|
||||||
raise StandardError.new I18n.t("js.poll.results.groups.title", group: poll.groups)
|
raise StandardError.new I18n.t("js.poll.results.groups.title", groups: poll.groups)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -195,7 +195,7 @@ describe ::DiscoursePoll::PollsController do
|
||||||
|
|
||||||
expect(response.status).not_to eq(200)
|
expect(response.status).not_to eq(200)
|
||||||
json = ::JSON.parse(response.body)
|
json = ::JSON.parse(response.body)
|
||||||
expect(json["errors"][0]).to eq(I18n.t("js.poll.results.groups.title", trust_level: 2))
|
expect(json["errors"][0]).to eq(I18n.t("js.poll.results.groups.title", groups: poll.polls.first.groups))
|
||||||
end
|
end
|
||||||
|
|
||||||
it "doesn't discard anonymous votes when someone votes" do
|
it "doesn't discard anonymous votes when someone votes" do
|
||||||
|
|
Loading…
Reference in New Issue