We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 63f085f commit 61147cfCopy full SHA for 61147cf
spec/locales_spec.rb
@@ -80,6 +80,16 @@
80
end
81
82
83
+ it 'has only valid codes for known locales' do
84
+ described_class.all.each do |locale|
85
+ expect(locale.glotpress || 'xx').to match(/^[a-z]{2,3}(-[a-z]{2})?$/)
86
+ expect(locale.android || 'xx-rYY').to match(/^[a-z]{2,3}(-r[A-Z]{2})?$/)
87
+ expect(locale.google_play || 'xx-YY').to match(/^[a-z]{2,3}(-[A-Z]{2})?$/)
88
+ expect(locale.app_store || 'xx-Yy').to match(/^[a-z]{2,3}(-[A-Za-z]{2,4})?$/)
89
+ expect(locale.ios || 'xx-Yy').to match(/^[a-z]{2,3}(-[A-Za-z]{2,4})?$/)
90
+ end
91
92
+
93
it 'returns exactly 16 Mag16 locales' do
94
expect(described_class.mag16.count).to eq(16)
95
0 commit comments