mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 02:48:28 +08:00
Add extra locales to bootstrap.json
This allows an app (such as Ember CLI) to get the full list of locales for a user, including admin and overrides.
This commit is contained in:
@ -39,4 +39,16 @@ describe BootstrapController do
|
||||
expect(preloaded['topicTrackingStates']).to be_present
|
||||
end
|
||||
|
||||
it "returns extra locales (admin) when staff" do
|
||||
user = Fabricate(:admin)
|
||||
sign_in(user)
|
||||
get "/bootstrap.json"
|
||||
expect(response.status).to eq(200)
|
||||
|
||||
json = response.parsed_body
|
||||
expect(json).to be_present
|
||||
|
||||
bootstrap = json['bootstrap']
|
||||
expect(bootstrap['extra_locales']).to be_present
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user