mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-05 23:06:10 +00:00
23 lines
512 B
C#
23 lines
512 B
C#
using System;
|
|
using Octokit;
|
|
using Xunit;
|
|
|
|
public class NewReferenceTests
|
|
{
|
|
public class TheCtor
|
|
{
|
|
[Fact]
|
|
public void EnforcesRefsPrefix()
|
|
{
|
|
var create = new NewReference("heads/develop", "sha");
|
|
|
|
Assert.Equal("refs/heads/develop", create.Ref);
|
|
}
|
|
|
|
[Fact]
|
|
public void ThrowsExceptionIfRefHasLessThanTwoSlashes()
|
|
{
|
|
Assert.Throws<FormatException>(() => new NewReference("refs/develop", "sha"));
|
|
}
|
|
}
|
|
} |