BMC/BCS.BMC/test/BCS.BMC.Web.Tests/Controllers/HomeController_Tests.cs

29 lines
720 B
C#
Raw Permalink Normal View History

2022-10-10 20:44:01 +05:30
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();
}
}
}