2019-02-24 19:15:42 +08:00
|
|
|
|
using Bootstrap.DataAccess;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using Xunit;
|
|
|
|
|
|
|
|
|
|
namespace Bootstrap.Admin.Api
|
|
|
|
|
{
|
|
|
|
|
public class AppsTest : ControllerTest
|
|
|
|
|
{
|
|
|
|
|
public AppsTest(BAWebHost factory) : base(factory, "api/Apps") { }
|
|
|
|
|
|
|
|
|
|
[Fact]
|
2019-03-22 15:46:32 +08:00
|
|
|
|
public async void Get_Ok()
|
2019-02-24 19:15:42 +08:00
|
|
|
|
{
|
|
|
|
|
var rid = new Role().Retrieves().Where(r => r.RoleName == "Administrators").First().Id;
|
2019-03-22 15:46:32 +08:00
|
|
|
|
var cates = await Client.GetAsJsonAsync<IEnumerable<App>>(rid);
|
2019-02-24 19:15:42 +08:00
|
|
|
|
Assert.NotEmpty(cates);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|