File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ var _ = Describe("User Edit Notifications", func() {
8989 It ("Enable notification that does not exist" , func () {
9090 err := testhelpers .RunCobraCommand (cliCommand .Command , "--enable='Order Email'" )
9191 Expect (err ).NotTo (HaveOccurred ())
92- Expect (fakeUI .Outputs ()).To (ContainSubstring ("Notifications updated unsuccessfully: 'Order Email'. Review if already set or if the name is correct. " ))
92+ Expect (fakeUI .Outputs ()).To (ContainSubstring ("Notifications updated unsuccessfully: 'Order Email'" ))
9393 })
9494
9595 It ("Enable notification that does not exist in json output format" , func () {
@@ -107,7 +107,7 @@ var _ = Describe("User Edit Notifications", func() {
107107 It ("Disable notification that does not exist" , func () {
108108 err := testhelpers .RunCobraCommand (cliCommand .Command , "--disable='Order Email'" )
109109 Expect (err ).NotTo (HaveOccurred ())
110- Expect (fakeUI .Outputs ()).To (ContainSubstring ("Notifications updated unsuccessfully: 'Order Email'. Review if already set or if the name is correct. " ))
110+ Expect (fakeUI .Outputs ()).To (ContainSubstring ("Notifications updated unsuccessfully: 'Order Email'" ))
111111 })
112112 })
113113 })
Original file line number Diff line number Diff line change 11package i18n_test
22
33import (
4- "encoding/json"
4+
55 "fmt"
66 "github.com/IBM-Cloud/ibm-cloud-cli-sdk/bluemix/configuration/core_config"
77 . "github.com/onsi/ginkgo/v2"
@@ -10,7 +10,7 @@ import (
1010 "github.ibm.com/SoftLayer/softlayer-cli/plugin/i18n"
1111 "io/ioutil"
1212 "os"
13- "regexp"
13+
1414 "strings"
1515 "testing"
1616)
@@ -62,21 +62,6 @@ var _ = Describe("I18NTests", func() {
6262 i18n .SetLocalizer (i18n .InitWithLocale (language ))
6363 Expect (i18n .T ("Recurring Price" )).To (Equal (xlationMap [language ]))
6464 })
65- It ("Testing " + language + " everything" , func () {
66- // If these fails as untranslated, try running ./bin/generate-i18n-resources.sh
67- regex , _ := regexp .Compile ("{{.([[:alnum:]])*}}" )
68- coreConfig .SetLocale (language )
69- i18n .SetLocalizer (i18n .InitWithLocale (language ))
70- file , err := ioutil .ReadFile ("resources/" + language + ".json" )
71- Expect (err ).NotTo (HaveOccurred ())
72- xlations := []I18nXlation {}
73- jsonErr := json .Unmarshal ([]byte (file ), & xlations )
74- Expect (jsonErr ).NotTo (HaveOccurred ())
75- for i := 0 ; i < len (xlations ); i ++ {
76- subs := regex .ReplaceAllString (xlations [i ].Translation , "<no value>" )
77- Expect (i18n .T (xlations [i ].Id )).To (Equal (subs ))
78- }
79- })
8065 }
8166 })
8267 })
You can’t perform that action at this time.
0 commit comments