mirror of https://github.com/Ombi-app/Ombi
commit
c13958980e
@ -0,0 +1,18 @@
|
||||
name: ASP.NET Core CI
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Setup .NET Core
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 2.2.108
|
||||
|
||||
- name: Build Backend
|
||||
run: ./build.sh --settings_skipverification=true
|
@ -0,0 +1,9 @@
|
||||
workflow "New workflow" {
|
||||
on = "push"
|
||||
resolves = [".NET Core CLI"]
|
||||
}
|
||||
|
||||
action ".NET Core CLI" {
|
||||
uses = "baruchiro/github-actions@0.0.1"
|
||||
args = "build src/Ombi.sln"
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Ombi.Helpers.Tests
|
||||
{
|
||||
[TestFixture]
|
||||
public class StringHelperTests
|
||||
{
|
||||
[Test]
|
||||
public void ToHttpsUrl_ShouldReturnsHttpsUrl_HttpUrl()
|
||||
{
|
||||
var sourceUrl = "http://www.test.url";
|
||||
var expectedUrl = "https://www.test.url";
|
||||
|
||||
Assert.AreEqual(expectedUrl, sourceUrl.ToHttpsUrl(), "Should return the source URL as https");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ToHttpsUrl_ShouldReturnsUnchangedUrl_HttpsUrl()
|
||||
{
|
||||
var sourceUrl = "https://www.test.url";
|
||||
var expectedUrl = "https://www.test.url";
|
||||
|
||||
Assert.AreEqual(expectedUrl, sourceUrl.ToHttpsUrl(), "Should return the unchanged https URL");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ToHttpsUrl_ShouldReturnsUnchangedUrl_NonHttpUrl()
|
||||
{
|
||||
var sourceUrl = "ftp://www.test.url";
|
||||
var expectedUrl = "ftp://www.test.url";
|
||||
|
||||
Assert.AreEqual(expectedUrl, sourceUrl.ToHttpsUrl(), "Should return the unchanged non-http URL");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ToHttpsUrl_ShouldReturnsUnchangedUrl_InvalidUrl()
|
||||
{
|
||||
var sourceUrl = "http:/www.test.url";
|
||||
var expectedUrl = "http:/www.test.url";
|
||||
|
||||
Assert.AreEqual(expectedUrl, sourceUrl.ToHttpsUrl(), "Should return the unchanged invalid URL");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in new issue