fix: keep opportunity data synchronized
CI and Deploy / test (push) Successful in 2m46s
CI and Deploy / deploy (push) Successful in 54s

This commit is contained in:
cesnimda
2026-07-31 00:12:10 +02:00
parent 10d548f799
commit af3cf1cdaa
2 changed files with 32 additions and 23 deletions
@@ -239,6 +239,7 @@ public sealed class JobApplicationsEndpointBehaviorTests
SalaryMax = 60000m,
SalaryCurrency = "NOK",
SalaryPeriod = "year",
Job = new Job { CompanyId = company.Id, JobTitle = "Backend Dev", Source = "nav", CountryCode = "NO" },
};
db.JobApplications.Add(job);
await db.SaveChangesAsync();
@@ -278,6 +279,12 @@ public sealed class JobApplicationsEndpointBehaviorTests
Assert.Null(saved.SalaryMax);
Assert.Null(saved.SalaryCurrency);
Assert.Null(saved.SalaryPeriod);
var opportunity = await db.Jobs.SingleAsync();
Assert.Equal(saved.JobTitle, opportunity.JobTitle);
Assert.Null(opportunity.SalaryMin);
Assert.Null(opportunity.SalaryPeriod);
Assert.Equal("nav", opportunity.Source);
Assert.Equal("NO", opportunity.CountryCode);
}
private static JobApplicationsController CreateController(JobTrackerContext db, string userId)