Skip to content

Commit

Permalink
convert getting country code test
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Feb 6, 2020
1 parent 72c6f8c commit db87416
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 45 deletions.
12 changes: 12 additions & 0 deletions language/test/Language_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -529,4 +529,16 @@
expect(subject.IncompleteTranslation("cs_CZ")).to eq false
end
end

describe "#GetGivenLanguageCountry" do
it "returns country part of passed language" do
expect(subject.GetGivenLanguageCountry("de_AT@UTF8")).to eq "AT"
expect(subject.GetGivenLanguageCountry("de_AT.UTF8")).to eq "AT"
expect(subject.GetGivenLanguageCountry("de_AT")).to eq "AT"
end

it "returns upper cased language if country part is missing" do
expect(subject.GetGivenLanguageCountry("de")).to eq "DE"
end
end
end
Empty file.
6 changes: 0 additions & 6 deletions language/testsuite/tests/Language.out

This file was deleted.

39 changes: 0 additions & 39 deletions language/testsuite/tests/Language.rb

This file was deleted.

0 comments on commit db87416

Please sign in to comment.