4648
This commit is contained in:
@@ -75,10 +75,6 @@ namespace raven_integration
|
||||
|
||||
//create via inventory full test user as attachments use the role of the object attaching to
|
||||
a = await Util.PostFormDataAsync("attachment", formDataContent, await Util.GetTokenAsync("superuser", "l3tm3in"));
|
||||
// {[error, {
|
||||
// "code": "2203",
|
||||
// "message": "Missing one or more required FormFieldData values: AttachToAType, AttachToObjectId, FileData"
|
||||
// }]}
|
||||
|
||||
Util.ValidateDataReturnResponseOk(a);
|
||||
|
||||
@@ -123,7 +119,7 @@ namespace raven_integration
|
||||
|
||||
MultipartFormDataContent formDataContent = new MultipartFormDataContent();
|
||||
|
||||
formDataContent.Add(new StringContent("2"), name: "AttachToObjectType");
|
||||
formDataContent.Add(new StringContent("3"), name: "AttachToAType");
|
||||
formDataContent.Add(new StringContent("1"), name: "AttachToObjectId");
|
||||
formDataContent.Add(new StringContent("Test:AttachmentUploadDownloadDeleteShouldWork"), name: "Notes");
|
||||
formDataContent.Add(new StringContent("[{\"name\":\"test.png\",\"lastModified\":1586900220990}]"), name: "FileData");
|
||||
@@ -155,7 +151,7 @@ namespace raven_integration
|
||||
//Form data bizobject type and id
|
||||
|
||||
//HERE IS THE ERROR CONDITION: LICENSE TYPE OBJECT WHICH IS UNATTACHABLE
|
||||
formDataContent.Add(new StringContent("5"), name: "AttachToObjectType");
|
||||
formDataContent.Add(new StringContent("5"), name: "AttachToAType");
|
||||
formDataContent.Add(new StringContent("1"), name: "AttachToObjectId");
|
||||
|
||||
StreamContent file1 = new StreamContent(File.OpenRead($"{Util.TEST_DATA_FOLDER}\\test.png"));
|
||||
@@ -180,10 +176,10 @@ namespace raven_integration
|
||||
MultipartFormDataContent formDataContent = new MultipartFormDataContent();
|
||||
|
||||
//Form data like the bizobject type and id
|
||||
formDataContent.Add(new StringContent("2"), name: "AttachToObjectType");
|
||||
formDataContent.Add(new StringContent("3"), name: "AttachToAType");
|
||||
|
||||
//HERE IS THE ERROR CONDITION, A NON EXISTENT ID VALUE FOR THE WIDGET
|
||||
formDataContent.Add(new StringContent(long.MaxValue.ToString()), name: "AttachToObjectId");//non-existent widget
|
||||
//HERE IS THE ERROR CONDITION, A NON EXISTENT ID VALUE FOR THE USER
|
||||
formDataContent.Add(new StringContent(long.MaxValue.ToString()), name: "AttachToObjectId");//non-existent user
|
||||
|
||||
StreamContent file1 = new StreamContent(File.OpenRead($"{Util.TEST_DATA_FOLDER}\\test.png"));
|
||||
file1.Headers.ContentType = new MediaTypeHeaderValue("image/png");
|
||||
|
||||
Reference in New Issue
Block a user