translate: fix tests
Underlying apiary sends prettyPrint:false (for performance reasons). Updates the
tests accordingly.
Fixes
@@ -96,20 +96,24 @@ func TestTranslateURL(t *testing.T) {
{language.Spanish, []string{"text"}, nil, url.Values{
"q": []string{"text"},
"target": []string{"es"},
+ "prettyPrint": []string{"false"},
}},
{language.English, []string{"text"}, &Options{}, url.Values{
"q": []string{"text"},
"target": []string{"en"},
+ "prettyPrint": []string{"false"},
}},
{language.Turkish, []string{"t1", "t2"}, nil, url.Values{
"q": []string{"t1", "t2"},
"target": []string{"tr"},
+ "prettyPrint": []string{"false"},
}},
{language.English, []string{"text"}, &Options{Source: language.French},
url.Values{
"q": []string{"text"},
"source": []string{"fr"},
"target": []string{"en"},
+ "prettyPrint": []string{"false"},
},
},
{language.English, []string{"text"}, &Options{Source: language.French, Format: HTML}, url.Values{
@@ -117,6 +121,7 @@ func TestTranslateURL(t *testing.T) {
"source": []string{"fr"},
"format": []string{"html"},
"target": []string{"en"},
+ "prettyPrint": []string{"false"},
}},
} {
_, err = c.Translate(ctx, test.inputs, test.target, test.opts)
