From c5d2be1685eafdc3878dc594ec19010335909682 Mon Sep 17 00:00:00 2001 From: Cyberboss Date: Mon, 20 Aug 2018 16:49:43 -0400 Subject: [PATCH] Fix build --- src/DMAPI/tgs.dm | 2 +- src/DMAPI/tgs/v4/api.dm | 2 +- .../TestApiHeaders.cs | 23 +++++++++++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 tests/Tgstation.Server.Api.Tests/TestApiHeaders.cs diff --git a/src/DMAPI/tgs.dm b/src/DMAPI/tgs.dm index c96d7500b9..bf16366b51 100644 --- a/src/DMAPI/tgs.dm +++ b/src/DMAPI/tgs.dm @@ -100,7 +100,7 @@ var/connection_name //the name of the configured chat connection var/is_admin_channel //if the server operator has marked this channel for game admins only var/is_private_channel //if this is a private chat channel - var/tag //user defined string associated with channel + var/custom_tag //user defined string associated with channel //represents a chat user /datum/tgs_chat_user diff --git a/src/DMAPI/tgs/v4/api.dm b/src/DMAPI/tgs/v4/api.dm index 29cea8ab8b..92251d1e43 100644 --- a/src/DMAPI/tgs/v4/api.dm +++ b/src/DMAPI/tgs/v4/api.dm @@ -292,7 +292,7 @@ channel.connection_name = channel_json["connectionName"] channel.is_admin_channel = channel_json["isAdminChannel"] channel.is_private_channel = channel_json["isPrivateChannel"] - channel.tag = channel_json["tag"] + channel.custom_tag = channel_json["tag"] return channel /* diff --git a/tests/Tgstation.Server.Api.Tests/TestApiHeaders.cs b/tests/Tgstation.Server.Api.Tests/TestApiHeaders.cs new file mode 100644 index 0000000000..f6347eff63 --- /dev/null +++ b/tests/Tgstation.Server.Api.Tests/TestApiHeaders.cs @@ -0,0 +1,23 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Net.Http.Headers; + +namespace Tgstation.Server.Api.Tests +{ + /// + /// Tests for + /// + [TestClass] + public sealed class TestApiHeaders + { + readonly ProductHeaderValue productHeaderValue = new ProductHeaderValue("Tgstation.Server.Api.Tests", "1.0.0"); + + [TestMethod] + public void TestConstruction() + { + Assert.ThrowsException(() => new ApiHeaders(null, null)); + Assert.ThrowsException(() => new ApiHeaders(productHeaderValue, null)); + var headers = new ApiHeaders(productHeaderValue, String.Empty); + } + } +}