mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-06 20:13:40 +00:00
24 lines
584 B
C#
24 lines
584 B
C#
using System.Net;
|
|
using Xunit;
|
|
|
|
using static Octokit.Internal.TestSetup;
|
|
|
|
namespace Octokit.Tests.Exceptions
|
|
{
|
|
public class TwoFactorRequiredExceptionTests
|
|
{
|
|
public class TheCtor
|
|
{
|
|
[Fact]
|
|
public void SetsDefaultMessage()
|
|
{
|
|
var response = CreateResponse(HttpStatusCode.Unauthorized);
|
|
|
|
var exception = new TwoFactorRequiredException(response, TwoFactorType.Sms);
|
|
|
|
Assert.Equal("Two-factor authentication code is required", exception.Message);
|
|
}
|
|
}
|
|
}
|
|
}
|