diff --git a/src/Altinn.Notifications.Core/Models/Email.cs b/src/Altinn.Notifications.Core/Models/Email.cs index c27b6594..83e04f1b 100644 --- a/src/Altinn.Notifications.Core/Models/Email.cs +++ b/src/Altinn.Notifications.Core/Models/Email.cs @@ -43,9 +43,9 @@ public class Email /// /// Initializes a new instance of the class. /// - public Email(Guid id, string subject, string body, string fromAddress, string toAddress, EmailContentType contentType) + public Email(Guid notificationId, string subject, string body, string fromAddress, string toAddress, EmailContentType contentType) { - NotificationId = id; + NotificationId = notificationId; Subject = subject; Body = body; FromAddress = fromAddress; diff --git a/src/Altinn.Notifications/Validators/EmailNotificationOrderRequestValidator.cs b/src/Altinn.Notifications/Validators/EmailNotificationOrderRequestValidator.cs index 9ffb8301..d3560ef7 100644 --- a/src/Altinn.Notifications/Validators/EmailNotificationOrderRequestValidator.cs +++ b/src/Altinn.Notifications/Validators/EmailNotificationOrderRequestValidator.cs @@ -5,7 +5,7 @@ namespace Altinn.Notifications.Validators; /// -/// Claass contining validation logic for the model +/// Class containing validation logic for the model /// public class EmailNotificationOrderRequestValidator : AbstractValidator { @@ -22,7 +22,7 @@ public EmailNotificationOrderRequestValidator() RuleFor(order => order.RequestedSendTime) .Must(sendTime => sendTime >= DateTime.UtcNow.AddMinutes(-5)) - .WithMessage("Send time must be in the future. Leave blank to send immediatly."); + .WithMessage("Send time must be in the future. Leave blank to send immediately."); RuleFor(order => order.Body).NotEmpty(); RuleFor(order => order.Subject).NotEmpty(); diff --git a/src/Altinn.Notifications/appsettings.json b/src/Altinn.Notifications/appsettings.json index 23f28ac2..4cec5843 100644 --- a/src/Altinn.Notifications/appsettings.json +++ b/src/Altinn.Notifications/appsettings.json @@ -30,7 +30,7 @@ "altinn.notifications.health.check", "altinn.notifications.orders.pastdue", "altinn.notifications.orders.pastdue.retry", - "altinn.notification.email.queue" + "altinn.notifications.email.queue" ] } }, diff --git a/test/Altinn.Notifications.Tests/Notifications.Core/TestingModels/EmailTests.cs b/test/Altinn.Notifications.Tests/Notifications.Core/TestingModels/EmailTests.cs index 5afc4b7a..bf15041d 100644 --- a/test/Altinn.Notifications.Tests/Notifications.Core/TestingModels/EmailTests.cs +++ b/test/Altinn.Notifications.Tests/Notifications.Core/TestingModels/EmailTests.cs @@ -18,7 +18,7 @@ public EmailTests() _email = new Email(id, "subject", "body", "from@domain.com", "to@domain.com", EmailContentType.Html); _serializedEmail = new JsonObject() { - { "id", id }, + { "notificationId", id }, { "subject", "subject" }, {"body", "body" }, {"fromAddress", "from@domain.com" }, diff --git a/test/Altinn.Notifications.Tests/Notifications/TestingValidators/EmailNotificationOrderRequestValidatorTests.cs b/test/Altinn.Notifications.Tests/Notifications/TestingValidators/EmailNotificationOrderRequestValidatorTests.cs index 3d54cb36..a27fc247 100644 --- a/test/Altinn.Notifications.Tests/Notifications/TestingValidators/EmailNotificationOrderRequestValidatorTests.cs +++ b/test/Altinn.Notifications.Tests/Notifications/TestingValidators/EmailNotificationOrderRequestValidatorTests.cs @@ -68,7 +68,7 @@ public void Validate_SendTimePassed_ReturnsFalse() var actual = _validator.Validate(order); Assert.False(actual.IsValid); - Assert.Contains(actual.Errors, a => a.ErrorMessage.Equals("Send time must be in the future. Leave blank to send immediatly.")); + Assert.Contains(actual.Errors, a => a.ErrorMessage.Equals("Send time must be in the future. Leave blank to send immediately.")); } [Fact] diff --git a/test/k6/docker-compose.yml b/test/k6/docker-compose.yml index 366f3ce1..5006baf2 100644 --- a/test/k6/docker-compose.yml +++ b/test/k6/docker-compose.yml @@ -5,7 +5,7 @@ networks: services: k6: - image: loadimpact/k6:0.46.0 + image: grafana/k6:0.46.0 networks: - k6 ports: diff --git a/test/k6/src/data/orders/01-email-request.json b/test/k6/src/data/orders/01-email-request.json index a2910fc4..fc85b687 100644 --- a/test/k6/src/data/orders/01-email-request.json +++ b/test/k6/src/data/orders/01-email-request.json @@ -2,5 +2,5 @@ "subject": "Automated email from Altinn", "body": "This is an automated email generated during testing of Altinn Notifications", "content-type": "Html", - "fromAddress": "noreply@altinn.no" -} \ No newline at end of file + "fromAddress": "noreply@altinn.cloud" +}