Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasMoth committed Feb 9, 2024
1 parent 851e7fd commit f0895ab
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,7 @@ codeunit 134370 "ERM No. Series Tests"

[Test]
[TransactionModel(TransactionModel::AutoRollback)]
[HandlerFunctions('TestSeriesSuccessMessageHandler')]
procedure NoSeriesThatCanGenerateNextNoSucceedsValidation()
var
NoSeriesLine: Record "No. Series Line";
Expand All @@ -557,6 +558,7 @@ codeunit 134370 "ERM No. Series Tests"

[Test]
[TransactionModel(TransactionModel::AutoRollback)]
[HandlerFunctions('TestSeriesSuccessMessageHandler')]
procedure NoSeriesValidationDoesNotChangeTheNextNoGenerated()
var
NoSeriesLine: Record "No. Series Line";
Expand Down Expand Up @@ -1074,10 +1076,15 @@ codeunit 134370 "ERM No. Series Tests"
NoSeriesPage.OK().Invoke();
end;


local procedure Initialize()
begin
PermissionsMock.Set('No. Series - Admin');
DeleteNumberSeries('TEST');
end;

[MessageHandler]
procedure TestSeriesSuccessMessageHandler(Message: Text[1024])
begin
LibraryAssert.IsTrue(Message.StartsWith('The test was successful.'), 'The test series was not successful, message: ' + Message);
end;
}

0 comments on commit f0895ab

Please sign in to comment.