FIX: Plugin "admin_js" translations bundle was not fetched.

This commit is contained in:
Guo Xiang Tan
2016-09-29 04:26:36 +08:00
parent 50d4f9d016
commit 72ccb4e11d
3 changed files with 56 additions and 25 deletions

View File

@@ -18,6 +18,26 @@ describe ExtraLocalesController do
get :show, bundle: '-invalid..character!!'
expect(response).to_not be_success
end
it "should include plugin translations" do
JsLocaleHelper.expects(:plugin_translations).with("en").returns({
"admin_js" => {
"admin" => {
"site_settings" => {
"categories" => {
"github_badges" => "Github Badges"
}
}
}
}
}).at_least_once
get :show, bundle: "admin"
expect(response).to be_success
expect(response.body.include?("github_badges")).to eq(true)
end
end
end