Commit eaf50d3d authored by Nicolas Frandeboeuf's avatar Nicolas Frandeboeuf Committed by Nicolas Frandeboeuf

[tests] Fix m6 test (check operationTypeID deletion)

parent 5dd85ce3
Pipeline #114130 passed with stages
in 6 minutes and 13 seconds
...@@ -557,18 +557,20 @@ describe('Test migration 6', () => { ...@@ -557,18 +557,20 @@ describe('Test migration 6', () => {
result.should.equal(true); result.should.equal(true);
}); });
it('should have replaced the operationTypeId property with a "type" property', async function() { it('should have replaced the operationTypeID property with a "type" property', async function() {
let allTransactions = await Transactions.all(0); let allTransactions = await Transactions.all(0);
let transaction = allTransactions.find( let transaction = allTransactions.find(
t => t.title === transactionWithTransactionType.title t => t.title === transactionWithTransactionType.title
); );
transaction.type.should.equal(transactionType.name); transaction.type.should.equal(transactionType.name);
should.not.exist(transaction.operationTypeID);
transaction = allTransactions.find( transaction = allTransactions.find(
t => t.title === transactionWithUnknownTransactionTypeId.title t => t.title === transactionWithUnknownTransactionTypeId.title
); );
transaction.type.should.equal(UNKNOWN_OPERATION_TYPE); transaction.type.should.equal(UNKNOWN_OPERATION_TYPE);
should.not.exist(transaction.operationTypeID);
}); });
it('should not have modified the transaction type if already existing', async function() { it('should not have modified the transaction type if already existing', async function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment