Commit 247352ac authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'update-user-specs-for-delegated-methods' into 'master'

Update user model specs for delegated methods

See merge request gitlab-org/gitlab!33798
parents eceeaf9d 3e947673
......@@ -23,8 +23,38 @@ describe User do
describe 'delegations' do
it { is_expected.to delegate_method(:path).to(:namespace).with_prefix }
it { is_expected.to delegate_method(:notes_filter_for).to(:user_preference) }
it { is_expected.to delegate_method(:set_notes_filter).to(:user_preference) }
it { is_expected.to delegate_method(:first_day_of_week).to(:user_preference) }
it { is_expected.to delegate_method(:first_day_of_week=).to(:user_preference).with_arguments(:args) }
it { is_expected.to delegate_method(:timezone).to(:user_preference) }
it { is_expected.to delegate_method(:timezone=).to(:user_preference).with_arguments(:args) }
it { is_expected.to delegate_method(:time_display_relative).to(:user_preference) }
it { is_expected.to delegate_method(:time_display_relative=).to(:user_preference).with_arguments(:args) }
it { is_expected.to delegate_method(:time_format_in_24h).to(:user_preference) }
it { is_expected.to delegate_method(:time_format_in_24h=).to(:user_preference).with_arguments(:args) }
it { is_expected.to delegate_method(:show_whitespace_in_diffs).to(:user_preference) }
it { is_expected.to delegate_method(:show_whitespace_in_diffs=).to(:user_preference).with_arguments(:args) }
it { is_expected.to delegate_method(:tab_width).to(:user_preference) }
it { is_expected.to delegate_method(:tab_width=).to(:user_preference).with_arguments(5) }
it { is_expected.to delegate_method(:tab_width=).to(:user_preference).with_arguments(:args) }
it { is_expected.to delegate_method(:sourcegraph_enabled).to(:user_preference) }
it { is_expected.to delegate_method(:sourcegraph_enabled=).to(:user_preference).with_arguments(:args) }
it { is_expected.to delegate_method(:setup_for_company).to(:user_preference) }
it { is_expected.to delegate_method(:setup_for_company=).to(:user_preference).with_arguments(:args) }
it { is_expected.to delegate_method(:render_whitespace_in_code).to(:user_preference) }
it { is_expected.to delegate_method(:render_whitespace_in_code=).to(:user_preference).with_arguments(:args) }
it { is_expected.to delegate_method(:job_title).to(:user_detail).allow_nil }
it { is_expected.to delegate_method(:job_title=).to(:user_detail).with_arguments(:args).allow_nil }
end
describe 'associations' do
......
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