diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-03-18 01:42:46 +0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-03-18 01:42:46 +0300 |
commit | 0a7f7161198feaa9a4cae7c16669a0e6187aed33 (patch) | |
tree | 445dcbd9f473be2af293a299b634525725a70666 /spec/finders/groups_finder_spec.rb | |
parent | a18ac62756573a2da2c42ca50b6f30033be6fa63 (diff) |
Code fixes
Diffstat (limited to 'spec/finders/groups_finder_spec.rb')
-rw-r--r-- | spec/finders/groups_finder_spec.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/finders/groups_finder_spec.rb b/spec/finders/groups_finder_spec.rb index ed24954af7a..d0fd7af8cc3 100644 --- a/spec/finders/groups_finder_spec.rb +++ b/spec/finders/groups_finder_spec.rb @@ -18,7 +18,14 @@ describe GroupsFinder do describe 'with a user' do subject { finder.execute(user) } - it { is_expected.to eq([public_group, internal_group]) } + context 'normal user' do + it { is_expected.to eq([public_group, internal_group]) } + end + + context 'external user' do + before { user.update_attribute(external: true) } + it { is_expected.to eq([public_group]) } + end end end end |