29 lines
720 B
C#
29 lines
720 B
C#
|
using System.Threading.Tasks;
|
|||
|
using BCS.BMC.Models.TokenAuth;
|
|||
|
using BCS.BMC.Web.Controllers;
|
|||
|
using Shouldly;
|
|||
|
using Xunit;
|
|||
|
|
|||
|
namespace BCS.BMC.Web.Tests.Controllers
|
|||
|
{
|
|||
|
public class HomeController_Tests: BMCWebTestBase
|
|||
|
{
|
|||
|
[Fact]
|
|||
|
public async Task Index_Test()
|
|||
|
{
|
|||
|
await AuthenticateAsync(null, new AuthenticateModel
|
|||
|
{
|
|||
|
UserNameOrEmailAddress = "admin",
|
|||
|
Password = "123qwe"
|
|||
|
});
|
|||
|
|
|||
|
//Act
|
|||
|
var response = await GetResponseAsStringAsync(
|
|||
|
GetUrl<HomeController>(nameof(HomeController.Index))
|
|||
|
);
|
|||
|
|
|||
|
//Assert
|
|||
|
response.ShouldNotBeNullOrEmpty();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|