Run tests with newest country select

It has changed the values to use country codes instead of names, so
anyone updating should be careful about that.
This commit is contained in:
Carlos Antonio da Silva 2015-01-04 15:10:45 -02:00
parent 80ad96fc34
commit 0e8ce2263f
6 changed files with 13 additions and 9 deletions

View File

@ -7,6 +7,6 @@ platforms :rbx do
gem 'rubinius-developer_tools'
end
gem 'country_select', '~> 1.1.1'
gem 'country_select', '~> 2.1.0'
gem 'railties'
gem 'rake'

View File

@ -31,7 +31,11 @@ GEM
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
builder (3.2.2)
country_select (1.1.3)
countries (0.9.3)
currencies (~> 0.4.2)
country_select (2.1.0)
countries (~> 0.9, >= 0.9.3)
currencies (0.4.2)
erubis (2.7.0)
ffi2-generators (0.1.1)
i18n (0.7.0)
@ -276,7 +280,7 @@ PLATFORMS
ruby
DEPENDENCIES
country_select (~> 1.1.1)
country_select (~> 2.1.0)
railties
rake
rubinius-developer_tools

View File

@ -7,7 +7,7 @@ platforms :rbx do
gem 'rubinius-developer_tools'
end
gem 'country_select', '~> 1.1.1'
gem 'country_select', '~> 2.1.0'
gem 'railties', github: 'rails/rails', branch: '4-0-stable'
gem 'activemodel', github: 'rails/rails', branch: '4-0-stable'
gem 'actionpack', github: 'rails/rails', branch: '4-0-stable'

View File

@ -7,7 +7,7 @@ platforms :rbx do
gem 'rubinius-developer_tools'
end
gem 'country_select', '~> 1.1.1'
gem 'country_select', '~> 2.1.0'
gem 'railties', github: 'rails/rails', branch: '4-1-stable'
gem 'activemodel', github: 'rails/rails', branch: '4-1-stable'
gem 'actionpack', github: 'rails/rails', branch: '4-1-stable'

View File

@ -7,7 +7,7 @@ platforms :rbx do
gem 'rubinius-developer_tools'
end
gem 'country_select', '~> 1.1.1'
gem 'country_select', '~> 2.1.0'
gem 'railties', github: 'rails/rails', branch: '4-2-stable'
gem 'activemodel', github: 'rails/rails', branch: '4-2-stable'
gem 'actionpack', github: 'rails/rails', branch: '4-2-stable'

View File

@ -5,14 +5,14 @@ class PriorityInputTest < ActionView::TestCase
test 'input generates a country select field' do
with_input_for @user, :country, :country
assert_select 'select#user_country'
assert_select 'select option[value=Brazil]', 'Brazil'
assert_no_select 'select option[value=""][disabled=disabled]'
assert_select 'select option[value=BR]', 'Brazil'
assert_no_select 'select option[value="---------------"][disabled=disabled]', '---------------'
end
test 'input generates a country select with SimpleForm default' do
swap SimpleForm, country_priority: [ 'Brazil' ] do
with_input_for @user, :country, :country
assert_select 'select option[value=""][disabled=disabled]'
assert_select 'select option[value="---------------"][disabled=disabled]', '---------------'
end
end