Commit f38aa2bf authored by Alexis Reigel's avatar Alexis Reigel

add missing allowed attributes

parent 921c96ab
......@@ -68,7 +68,9 @@ module Users
:twitter,
:username,
:website_url,
:private_profile
:private_profile,
:organization,
:location
]
end
......
......@@ -14,6 +14,48 @@ describe Users::BuildService do
expect(service.execute).to be_valid
end
context 'allowed params' do
let(:params) do
{
access_level: 1,
admin: 1,
avatar: anything,
bio: 1,
can_create_group: 1,
color_scheme_id: 1,
email: 1,
external: 1,
force_random_password: 1,
hide_no_password: 1,
hide_no_ssh_key: 1,
linkedin: 1,
name: 1,
password: 1,
password_automatically_set: 1,
password_expires_at: 1,
projects_limit: 1,
remember_me: 1,
skip_confirmation: 1,
skype: 1,
theme_id: 1,
twitter: 1,
username: 1,
website_url: 1,
private_profile: 1,
organization: 1,
location: 1
}
end
it 'sets all allowed attributes' do
admin_user # call first so the admin gets created before setting `expect`
expect(User).to receive(:new).with(hash_including(params)).and_call_original
service.execute
end
end
context 'with "user_default_external" application setting' do
using RSpec::Parameterized::TableSyntax
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment