This commit is contained in:
@@ -64,6 +64,37 @@ namespace raven_integration
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
[Fact]
|
||||||
|
public async void FilterOptionsRouteShouldWorkAsExpected()
|
||||||
|
{
|
||||||
|
//Get options with manager (english user)
|
||||||
|
ApiResponse a = await Util.GetAsync("Widget/FilterOptions", await Util.GetTokenAsync("manager", "l3tm3in"));
|
||||||
|
Util.ValidateDataReturnResponseOk(a);
|
||||||
|
Util.ValidateHTTPStatusCode(a, 200);
|
||||||
|
a.ObjectResponse["data"]["key"].Value<string>().Should().Be("Widget");
|
||||||
|
((JArray)a.ObjectResponse["data"]["flds"]).Count.Should().Be(6);
|
||||||
|
a.ObjectResponse["data"]["flds"][2]["lt"].Value<string>().Should().Be("Price");
|
||||||
|
|
||||||
|
a = await Util.GetAsync("Widget/FilterOptions", await Util.GetTokenAsync("es", "es"));
|
||||||
|
Util.ValidateDataReturnResponseOk(a);
|
||||||
|
Util.ValidateHTTPStatusCode(a, 200);
|
||||||
|
a.ObjectResponse["data"]["flds"][2]["lt"].Value<string>().Should().Be("Importe");
|
||||||
|
|
||||||
|
a = await Util.GetAsync("Widget/FilterOptions", await Util.GetTokenAsync("fr", "fr"));
|
||||||
|
Util.ValidateDataReturnResponseOk(a);
|
||||||
|
Util.ValidateHTTPStatusCode(a, 200);
|
||||||
|
a.ObjectResponse["data"]["flds"][2]["lt"].Value<string>().Should().Be("Montant");
|
||||||
|
|
||||||
|
a = await Util.GetAsync("Widget/FilterOptions", await Util.GetTokenAsync("de", "de"));
|
||||||
|
Util.ValidateDataReturnResponseOk(a);
|
||||||
|
Util.ValidateHTTPStatusCode(a, 200);
|
||||||
|
a.ObjectResponse["data"]["flds"][2]["lt"].Value<string>().Should().Be("Betrag");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user