Fix lang typo in ContentService & fix up the breaking unit test
This commit is contained in:
@@ -1202,7 +1202,7 @@ namespace Umbraco.Core.Services.Implement
|
||||
var langs = string.Join(", ", _languageRepository.GetMany()
|
||||
.Where(x => culturesChanging.InvariantContains(x.IsoCode))
|
||||
.Select(x => x.CultureName));
|
||||
Audit(AuditType.PublishVariant, userId, content.Id, $"Published languagues: {langs}", langs);
|
||||
Audit(AuditType.PublishVariant, userId, content.Id, $"Published languages: {langs}", langs);
|
||||
}
|
||||
else
|
||||
Audit(AuditType.Publish, userId, content.Id);
|
||||
|
||||
@@ -1293,11 +1293,11 @@ namespace Umbraco.Tests.Services
|
||||
{
|
||||
// Arrange
|
||||
|
||||
var langUk = new Language("en-UK") { IsDefault = true };
|
||||
var langGB = new Language("en-GB") { IsDefault = true };
|
||||
var langFr = new Language("fr-FR");
|
||||
|
||||
ServiceContext.LocalizationService.Save(langFr);
|
||||
ServiceContext.LocalizationService.Save(langUk);
|
||||
ServiceContext.LocalizationService.Save(langGB);
|
||||
|
||||
var contentType = MockedContentTypes.CreateBasicContentType();
|
||||
contentType.Variations = ContentVariation.Culture;
|
||||
@@ -1309,16 +1309,16 @@ namespace Umbraco.Tests.Services
|
||||
var published = ServiceContext.ContentService.SavePublishing(content);
|
||||
//audit log will only show that french was published
|
||||
var lastLog = ServiceContext.AuditService.GetLogs(content.Id).Last();
|
||||
Assert.AreEqual($"Published cultures: fr-fr", lastLog.Comment);
|
||||
Assert.AreEqual($"Published languages: French (France)", lastLog.Comment);
|
||||
|
||||
//re-get
|
||||
content = ServiceContext.ContentService.GetById(content.Id);
|
||||
content.SetCultureName("content-en", langUk.IsoCode);
|
||||
content.PublishCulture(langUk.IsoCode);
|
||||
content.SetCultureName("content-en", langGB.IsoCode);
|
||||
content.PublishCulture(langGB.IsoCode);
|
||||
published = ServiceContext.ContentService.SavePublishing(content);
|
||||
//audit log will only show that english was published
|
||||
lastLog = ServiceContext.AuditService.GetLogs(content.Id).Last();
|
||||
Assert.AreEqual($"Published cultures: en-uk", lastLog.Comment);
|
||||
Assert.AreEqual($"Published languages: English (United Kingdom)", lastLog.Comment);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
Reference in New Issue
Block a user