Commit 0c84713e authored by Maxim Rydkin's avatar Maxim Rydkin

fix rubocop

parent 7fe15d4f
...@@ -21,13 +21,13 @@ describe YetAnotherUsersFinder do ...@@ -21,13 +21,13 @@ describe YetAnotherUsersFinder do
it { is_expected.to match_array([user1, external_user, omniauth_user, current_user]) } it { is_expected.to match_array([user1, external_user, omniauth_user, current_user]) }
context 'when filtered by search' do context 'when filtered by search' do
let(:params) { {search: 'johndoe' } } let(:params) { { search: 'johndoe' } }
it { is_expected.to match_array([user1]) } it { is_expected.to match_array([user1]) }
end end
context 'when filtered by skip_users' do context 'when filtered by skip_users' do
let(:params) { {skip_users: [omniauth_user.id, current_user.id] } } let(:params) { { skip_users: [omniauth_user.id, current_user.id] } }
it { is_expected.to match_array([user1, external_user]) } it { is_expected.to match_array([user1, external_user]) }
end end
...@@ -39,20 +39,19 @@ describe YetAnotherUsersFinder do ...@@ -39,20 +39,19 @@ describe YetAnotherUsersFinder do
let!(:done_todo2) { create(:todo, user: user1, author: external_user, state: :done) } let!(:done_todo2) { create(:todo, user: user1, author: external_user, state: :done) }
context 'when filtered by todo_filter without todo_state_filter' do context 'when filtered by todo_filter without todo_state_filter' do
let(:params) { {todo_filter: true} } let(:params) { { todo_filter: true } }
it { is_expected.to match_array([]) } it { is_expected.to match_array([]) }
end end
context 'when filtered by todo_filter with pending todo_state_filter' do context 'when filtered by todo_filter with pending todo_state_filter' do
let(:params) { {todo_filter: true, todo_state_filter: 'pending'} } let(:params) { { todo_filter: true, todo_state_filter: 'pending' } }
it { is_expected.to match_array([user1]) } it { is_expected.to match_array([user1]) }
end end
context 'when filtered by todo_filter with done todo_state_filter' do context 'when filtered by todo_filter with done todo_state_filter' do
let(:params) { {todo_filter: true, todo_state_filter: 'done'} } let(:params) { { todo_filter: true, todo_state_filter: 'done' } }
it { is_expected.to match_array([external_user]) } it { is_expected.to match_array([external_user]) }
end end
...@@ -60,13 +59,13 @@ describe YetAnotherUsersFinder do ...@@ -60,13 +59,13 @@ describe YetAnotherUsersFinder do
context 'when filtered by current_user' do context 'when filtered by current_user' do
let(:current_user) { user2 } let(:current_user) { user2 }
let(:params) { {current_user: true } } let(:params) { { current_user: true } }
it { is_expected.to match_array([user2, user1, external_user, omniauth_user]) } it { is_expected.to match_array([user2, user1, external_user, omniauth_user]) }
end end
context 'when filtered by author_id' do context 'when filtered by author_id' do
let(:params) { {author_id: user2.id } } let(:params) { { author_id: user2.id } }
it { is_expected.to match_array([user2, user1, external_user, omniauth_user, current_user]) } it { is_expected.to match_array([user2, user1, external_user, omniauth_user, current_user]) }
end end
......
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