This commit is contained in:
@@ -51,7 +51,7 @@ namespace raven_integration
|
||||
List<string> keys = new List<string>();
|
||||
keys.AddRange(new string[] { "AddressType", "ClientName", "RateName", "WorkorderService" });
|
||||
dynamic d = new JObject();
|
||||
|
||||
|
||||
d = JToken.FromObject(keys);
|
||||
|
||||
ApiResponse a = await Util.PostAsync("Translation/subset", await Util.GetTokenAsync("CustomerLimited"), d.ToString());
|
||||
@@ -65,12 +65,6 @@ namespace raven_integration
|
||||
[Fact]
|
||||
public async void DuplicateUpdateAndDeleteWorks()
|
||||
{
|
||||
/*
|
||||
{
|
||||
"id": 1,
|
||||
"name": "CustomTest1"
|
||||
}
|
||||
*/
|
||||
|
||||
//DUPLICATE
|
||||
dynamic d = new JObject();
|
||||
@@ -92,15 +86,6 @@ namespace raven_integration
|
||||
//UPDATE
|
||||
//Update translation name
|
||||
|
||||
/*
|
||||
|
||||
{
|
||||
"id": 10,
|
||||
"newText": "What the hell?",
|
||||
"concurrencyToken": 25174
|
||||
}
|
||||
|
||||
*/
|
||||
dynamic d2 = new JObject();
|
||||
d2.id = NewId;
|
||||
d2.newText = Util.Uniquify("INTEGRATION-TEST-LOCALE NAME UPDATE");
|
||||
@@ -137,7 +122,7 @@ namespace raven_integration
|
||||
DUSER.login = Login;
|
||||
DUSER.password = Password;
|
||||
DUSER.roles = 0;//norole (any role can get a subset of translation keys)
|
||||
DUSER.translationId = NewId;
|
||||
// DUSER.translationId = NewId;
|
||||
DUSER.userType = 3;//non scheduleable
|
||||
//Required by form custom rules
|
||||
DUSER.notes = "notes";
|
||||
@@ -147,6 +132,28 @@ namespace raven_integration
|
||||
long DUSERID = a.ObjectResponse["data"]["id"].Value<long>();
|
||||
|
||||
|
||||
//RETRIEVE companion USEROPTIONS object
|
||||
ApiResponse R = await Util.GetAsync("UserOptions/" + DUSERID.ToString(), await Util.GetTokenAsync("manager", "l3tm3in"));
|
||||
Util.ValidateDataReturnResponseOk(R);
|
||||
//ensure the default value is set
|
||||
R.ObjectResponse["data"]["uiColor"].Value<string>().Should().Be("#000000");
|
||||
uint concurrencyToken = R.ObjectResponse["data"]["concurrencyToken"].Value<uint>();
|
||||
|
||||
//UPDATE
|
||||
|
||||
//PUT
|
||||
dynamic D2 = new JObject();
|
||||
D2.translationId = NewId;
|
||||
|
||||
D2.concurrencyToken = concurrencyToken;
|
||||
PUTTestResponse = await Util.PutAsync("UserOptions/" + DUSERID.ToString(), await Util.GetTokenAsync("manager", "l3tm3in"), D2.ToString());
|
||||
Util.ValidateHTTPStatusCode(PUTTestResponse, 200);
|
||||
|
||||
//VALIDATE
|
||||
R = await Util.GetAsync("UserOptions/" + DUSERID.ToString(), await Util.GetTokenAsync("manager", "l3tm3in"));
|
||||
Util.ValidateDataReturnResponseOk(R);
|
||||
|
||||
|
||||
|
||||
List<string> keys = new List<string>();
|
||||
keys.AddRange(new string[] { UpdatedTranslationKey });
|
||||
|
||||
Reference in New Issue
Block a user