diff --git a/app/models/chargeback_rate_detail_currency.rb b/app/models/chargeback_rate_detail_currency.rb index f6f8fabd02c..54de0f470c9 100644 --- a/app/models/chargeback_rate_detail_currency.rb +++ b/app/models/chargeback_rate_detail_currency.rb @@ -5,7 +5,6 @@ class ChargebackRateDetailCurrency < ApplicationRecord validates :name, :presence => true, :length => {:maximum => 100} validates :full_name, :presence => true, :length => {:maximum => 100} validates :symbol, :presence => true, :length => {:maximum => 100} - validates :unicode_hex, :presence => true, :length => {:minimum => 1} has_many :chargeback_rate_detail, :foreign_key => "chargeback_rate_detail_currency_id" diff --git a/db/fixtures/chargeback_rate_detail_currencies.yml b/db/fixtures/chargeback_rate_detail_currencies.yml index 644ff6f9c81..b2bdb7fbe78 100644 --- a/db/fixtures/chargeback_rate_detail_currencies.yml +++ b/db/fixtures/chargeback_rate_detail_currencies.yml @@ -1,21 +1,81 @@ --- -- :code: "USD" - :name: "Dollars" - :full_name: "United States Dollars" - :symbol: "$" - :unicode_hex: "36" +- :code: "AUD" + :name: "Dollar" + :full_name: "Australian Dollar" + :symbol: "A$" +- :code: "BRL" + :name: "Brazilian real" + :full_name: "Brazilian real" + :symbol: "R$" +- :code: "CAD" + :name: "Dollar" + :full_name: "Canadian Dollar" + :symbol: "C$" +- :code: "CHF" + :name: "Swiss franc" + :full_name: "Swiss franc" + :symbol: "Fr" +- :code: "CNY" + :name: "Renminbi" + :full_name: "Renminbi" + :symbol: "元" - :code: "EUR" :name: "Euro" :full_name: "Euro" :symbol: "€" - :unicode_hex: "8364" - :code: "GBP" :name: "Pounds" :full_name: "Pound Sterling" :symbol: "£" - :unicode_hex: "163" +- :code: "HKD" + :name: "Dollar" + :full_name: "Hong Kong dollar" + :symbol: "HK$" +- :code: "INR" + :name: "Indian rupee" + :full_name: "Indian rupee" + :symbol: "₹" - :code: "JPY" :name: "Yen" :full_name: "Japanese Yen" :symbol: "¥" - :unicode_hex: "165" +- :code: "KRW" + :name: "South Korean won" + :full_name: "South Korean won" + :symbol: "₩" +- :code: "MXN" + :name: "Mexican peso" + :full_name: "Mexican peso" + :symbol: "$" +- :code: "NZD" + :name: "Dollar" + :full_name: "New Zealand dollar" + :symbol: "NZ$" +- :code: "NOK" + :name: "Norwegian krone" + :full_name: "Norwegian krone" + :symbol: "kr" +- :code: "RUB" + :name: "Russian ruble" + :full_name: "Russian ruble" + :symbol: "₽" +- :code: "SEK" + :name: "Swedish krona" + :full_name: "Swedish krona" + :symbol: "kr" +- :code: "SGD" + :name: "Dollar" + :full_name: "Singapore dollar" + :symbol: "S$" +- :code: "TRY" + :name: "Turkish lira" + :full_name: "Turkish lira" + :symbol: "₺" +- :code: "USD" + :name: "Dollars" + :full_name: "United States Dollars" + :symbol: "$" +- :code: "ZAR" + :name: "South African rand" + :full_name: "South African rand" + :symbol: "R" diff --git a/spec/models/chargeback_rate_detail_currency_spec.rb b/spec/models/chargeback_rate_detail_currency_spec.rb index 2f9128331e1..a6f33778a10 100644 --- a/spec/models/chargeback_rate_detail_currency_spec.rb +++ b/spec/models/chargeback_rate_detail_currency_spec.rb @@ -14,7 +14,4 @@ it "is invalid without a symbol" do expect(FactoryGirl.build(:chargeback_rate_detail_currency, :symbol => nil)).not_to be_valid end - it "is invalid without a unicode_hex" do - expect(FactoryGirl.build(:chargeback_rate_detail_currency, :unicode_hex => nil)).not_to be_valid - end end