Add some more content language test assertions

See #6136
This commit is contained in:
Bjørn Erik Pedersen 2019-07-30 09:58:58 +02:00
parent 6eca0a3dee
commit 84bc8d84e4
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F

View file

@ -278,6 +278,18 @@ Content.
}
}
for i, p := range nnSite.RegularPages() {
msg := fmt.Sprintf("Test %d", i+1)
assert.Equal("nn", p.Language().Lang, msg)
assert.Contains(p.Title(), "nn", msg)
}
for i, p := range svSite.RegularPages() {
msg := fmt.Sprintf("Test %d", i+1)
assert.Equal("sv", p.Language().Lang, msg)
assert.Contains(p.Title(), "sv", msg)
}
// Check bundles
bundleEn := enSite.RegularPages()[len(enSite.RegularPages())-1]
bundleNn := nnSite.RegularPages()[len(nnSite.RegularPages())-1]