Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Commit

Permalink
Do not make country required when registering a member with auth
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Martinez committed Oct 12, 2016
1 parent f697817 commit cdecc97
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
2 changes: 1 addition & 1 deletion app/services/member_with_authentication.rb
Expand Up @@ -5,7 +5,7 @@ class MemberWithAuthentication
include ActiveModel::Model

validates :password, length: { minimum: 6 }, allow_nil: true
validates :email, :country, presence: true
validates :email, presence: true
validate :cannot_be_already_authenticated, :cannot_have_non_matching_passwords

attr_accessor(:first_name,
Expand Down
10 changes: 0 additions & 10 deletions spec/services/member_with_authentication_spec.rb
Expand Up @@ -43,16 +43,6 @@
expect(builder.errors[:email].first).to eq("can't be blank")
end

it 'on blank country' do
builder = MemberWithAuthentication.create(valid_params.except(:country))
expect(builder.errors[:country].first).to eq("can't be blank")
end

it 'on blank country' do
builder = MemberWithAuthentication.create(valid_params.except(:country))
expect(builder.errors[:country].first).to eq("can't be blank")
end

it 'on non-matching passwords' do
params = valid_params.merge(password: 'somethingelse')
builder = MemberWithAuthentication.create(params)
Expand Down

0 comments on commit cdecc97

Please sign in to comment.