summaryrefslogtreecommitdiff
path: root/spec/finders/group_finder_spec.rb
blob: 78dc027837cf571b23a04e8344c3c168240991a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require 'spec_helper'

describe GroupsFinder do
  let(:user) { create :user }
  let!(:group) { create :group }
  let!(:public_group) { create :group, public: true }
  
  describe :execute do
    it 'finds public group' do
      groups = GroupsFinder.new.execute(user)
      expect(groups.size).to eq(1)
      expect(groups.first).to eq(public_group)
    end
  end
end