diff --git a/src/components/Address.js b/src/components/Address.js
index 7acb42849..99aa2eb7b 100644
--- a/src/components/Address.js
+++ b/src/components/Address.js
@@ -83,11 +83,11 @@ class Address extends Component {
@@ -101,7 +101,7 @@ const fieldTypes = {
city: React.PropTypes.string,
state: React.PropTypes.string,
postal: React.PropTypes.string,
- country: React.PropTypes.string
+ countryCode: React.PropTypes.string
};
Address.propTypes = {
diff --git a/stories/Address.js b/stories/Address.js
index 9dcc10f3d..fb7ae6aa2 100644
--- a/stories/Address.js
+++ b/stories/Address.js
@@ -15,7 +15,7 @@ storiesOf('Address', module)
city: 'Smallsville',
state: 'AL',
postal: '12345-1234',
- country: 'US'
+ countryCode: 'US'
}}
onChange={action('address onChange')}
/>
@@ -30,7 +30,7 @@ storiesOf('Address', module)
city: text('city', 'Smallsville'),
state: select('state', states.map(s => s.value), 'AL'),
postal: text('postal', '12345-1234'),
- country: 'US'
+ countryCode: 'US'
}}
onChange={action('address onChange')}
/>
diff --git a/test/components/Address.spec.js b/test/components/Address.spec.js
index 88f3468d4..7af8ab130 100644
--- a/test/components/Address.spec.js
+++ b/test/components/Address.spec.js
@@ -20,7 +20,7 @@ describe('
', () => {
city: 'Gotham',
state: 'NJ',
postal: '07001',
- country: 'US'
+ countryCode: 'US'
}}
onChange={callback}
/>
@@ -82,17 +82,17 @@ describe('', () => {
});
it('should have country', () => {
- const input = component.find('[name="country"]');
+ const input = component.find('[name="countryCode"]');
assert.equal(input.type(), Select);
assert.equal(input.prop('placeholder'), 'Country');
assert.equal(input.prop('defaultValue'), 'US');
assert.equal(input.prop('value'), undefined);
input.simulate('change', { label: 'USA', value: 'US' });
- assert(callback.calledWith({ country: 'US' }));
+ assert(callback.calledWith({ countryCode: 'US' }));
input.simulate('change', null);
- assert(callback.calledWith({ country: null }));
+ assert(callback.calledWith({ countryCode: null }));
});
});
@@ -104,7 +104,7 @@ describe('', () => {
city: 'Gotham',
state: 'NJ',
postal: '07001',
- country: 'US'
+ countryCode: 'US'
}
const component = shallow(
', () => {
});
it('should update country', () => {
- const input = component.find('[name="country"]');
+ const input = component.find('[name="countryCode"]');
assert.equal(input.prop('value'), 'US');
assert.equal(input.prop('defaultValue'), '');
input.simulate('change', { label: 'USA', value: 'US' });
- assert(callback.calledWith(Object.assign({}, addressData, { country: 'US' })));
+ assert(callback.calledWith(Object.assign({}, addressData, { countryCode: 'US' })));
input.simulate('change', null);
- assert(callback.calledWith(Object.assign({}, addressData, { country: null })));
+ assert(callback.calledWith(Object.assign({}, addressData, { countryCode: null })));
});
});
});