This commit is contained in:
@@ -147,11 +147,10 @@ namespace AyaNova.Api.Controllers
|
|||||||
return StatusCode(503, new ApiErrorResponse(ApiErrorCode.API_CLOSED, null, serverState.Reason));
|
return StatusCode(503, new ApiErrorResponse(ApiErrorCode.API_CLOSED, null, serverState.Reason));
|
||||||
}
|
}
|
||||||
|
|
||||||
Dictionary<string, string> ret = new Dictionary<string, string>();
|
List<KeyValuePair<string, string>> ret = new List<KeyValuePair<string, string>>();
|
||||||
|
ret.Add(new KeyValuePair<string, string>("usertypes", "AyaNova user account types"));
|
||||||
ret.Add("usertypes", "AyaNova user account types");
|
ret.Add(new KeyValuePair<string, string>("authorizationroles", "AyaNova user account role types"));
|
||||||
ret.Add("authorizationroles", "AyaNova user account role types");
|
ret.Add(new KeyValuePair<string, string>("AyaType", "All AyaNova object types, use the AyaTypeController route to fetch these"));
|
||||||
ret.Add("AyaType", "All AyaNova object types, use the AyaTypeController route to fetch these");
|
|
||||||
|
|
||||||
return Ok(new ApiOkResponse(ret));
|
return Ok(new ApiOkResponse(ret));
|
||||||
}
|
}
|
||||||
|
|||||||
39
test/raven-integration/Enum/EnumListOps.cs
Normal file
39
test/raven-integration/Enum/EnumListOps.cs
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
using System;
|
||||||
|
using Xunit;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
using FluentAssertions;
|
||||||
|
|
||||||
|
namespace raven_integration
|
||||||
|
{
|
||||||
|
|
||||||
|
public class EnumListOps
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
[Fact]
|
||||||
|
public async void GetListOfEnumListsWorks()
|
||||||
|
{
|
||||||
|
|
||||||
|
ApiResponse a = await Util.GetAsync("AyaEnumPickList/listkeys", await Util.GetTokenAsync("manager", "l3tm3in"));
|
||||||
|
Util.ValidateDataReturnResponseOk(a);
|
||||||
|
Util.ValidateHTTPStatusCode(a, 200);
|
||||||
|
|
||||||
|
//assert contains at least 3 records
|
||||||
|
var ItemCount = ((JArray)a.ObjectResponse["data"]).Count;
|
||||||
|
ItemCount.Should().BeGreaterThan(2);
|
||||||
|
|
||||||
|
a.ObjectResponse["data"][0]["key"].Value<string>().Should().Be("usertypes");
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//==================================================
|
||||||
|
|
||||||
|
}//eoc
|
||||||
|
}//eons
|
||||||
Reference in New Issue
Block a user