feat(mission): /mission/receive_reward stub (refresh-only, no decomp)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-06-12 23:33:50 -04:00
parent e54e63a762
commit 025c2a8c56
3 changed files with 60 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
using System.Net;
using System.Text;
using NUnit.Framework;
using SVSim.UnitTests.Infrastructure;
namespace SVSim.UnitTests.Controllers;
public class MissionControllerReceiveRewardTests
{
[Test]
public async Task ReceiveReward_returns_ok()
{
using var factory = new SVSimTestFactory();
long viewerId = await factory.SeedViewerAsync(tutorialState: 0);
using var client = factory.CreateAuthenticatedClient(viewerId);
// INFERRED: id of the mission to claim. Defensive stub accepts even when
// the id doesn't match a current mission — there is no decomp Parse() to
// tell us how the server errors.
var requestJson = """{"id":1,"viewer_id":"0","steam_id":0,"steam_session_ticket":""}""";
var response = await client.PostAsync("/mission/receive_reward",
new StringContent(requestJson, Encoding.UTF8, "application/json"));
Assert.That(response.StatusCode, Is.EqualTo(HttpStatusCode.OK));
}
}