Skip to content

Instantly share code, notes, and snippets.

@sergiomichels
Last active December 22, 2015 17:49
Show Gist options
  • Select an option

  • Save sergiomichels/6508855 to your computer and use it in GitHub Desktop.

Select an option

Save sergiomichels/6508855 to your computer and use it in GitHub Desktop.
Accentuation not works
class JavascriptServiceSpec extends IntegrationSpec {
static final Locale PT = new Locale("pt","BR")
static final Locale EN = new Locale("en","US")
def javascriptService
def setup() {
}
def "criar mensagens internacionalizadas, considerando plugins"() {
given: "geração de mensagens"
String content = javascriptService.buildI18nJavascript(locale)
expect:
assert content.contains(msg1)
assert content.contains(msg2)
where:
locale | msg1 | msg2
EN | '\\"info.label\\":\\"Information\\"' | '\\"default.invalid.cpf.message\\":\\"The CPF is invalid.\\"'
//TODO PT | '\\"info.label\\":\\"Informação\\"' | '\\"default.invalid.cpf.message\\":\\"CPF inválido.\\"'
}
def "criar JSON object com a lista de domains"() {
given: "geração de domains"
String content = javascriptService.buildI18nDomains(locale)
expect:
assert content.contains(verify)
where:
locale | verify
EN | ''
PT | ''
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment