WIP
This commit is contained in:
@@ -98,16 +98,24 @@ public class ExpenseServiceTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Create_Vendor_AsFinance_IsImmediatelyPaid()
|
||||
public async Task Create_Vendor_AsFinance_IsPendingApproval()
|
||||
{
|
||||
var (svc, db, _) = Build();
|
||||
var r = Reimb(); r.Type = "VendorPayment"; r.VendorName = "ABC"; r.CheckNumber = "2051";
|
||||
var id = await svc.CreateAsync(r, isFinance: true);
|
||||
Assert.Equal("Paid", (await db.Expenses.FindAsync(id))!.Status);
|
||||
Assert.Equal("PendingApproval", (await db.Expenses.FindAsync(id))!.Status);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Create_Reimbursement_IsDraft_WithSubmitter()
|
||||
public async Task Create_Reimbursement_AsFinance_IsPendingApproval()
|
||||
{
|
||||
var (svc, db, _) = Build();
|
||||
var id = await svc.CreateAsync(Reimb(), isFinance: true);
|
||||
Assert.Equal("PendingApproval", (await db.Expenses.FindAsync(id))!.Status);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Create_Reimbursement_AsMember_IsDraft_WithSubmitter()
|
||||
{
|
||||
var (svc, db, _) = Build("alice");
|
||||
var id = await svc.CreateAsync(Reimb(), isFinance: false);
|
||||
|
||||
Reference in New Issue
Block a user