diff options
Diffstat (limited to 'spec/models/event_collection_spec.rb')
-rw-r--r-- | spec/models/event_collection_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/models/event_collection_spec.rb b/spec/models/event_collection_spec.rb index 6078f429bdc..bd61bb45d4d 100644 --- a/spec/models/event_collection_spec.rb +++ b/spec/models/event_collection_spec.rb @@ -1,7 +1,7 @@ -require 'spec_helper' +require "spec_helper" describe EventCollection do - describe '#to_a' do + describe "#to_a" do let(:project) { create(:project_empty_repo) } let(:projects) { Project.where(id: project.id) } let(:user) { create(:user) } @@ -16,31 +16,31 @@ describe EventCollection do create(:closed_issue_event, project: project, author: user) end - it 'returns an Array of events' do + it "returns an Array of events" do events = described_class.new(projects).to_a expect(events).to be_an_instance_of(Array) end - it 'applies a limit to the number of events' do + it "applies a limit to the number of events" do events = described_class.new(projects).to_a expect(events.length).to eq(20) end - it 'can paginate through events' do + it "can paginate through events" do events = described_class.new(projects, offset: 20).to_a expect(events.length).to eq(1) end - it 'returns an empty Array when crossing the maximum page number' do + it "returns an empty Array when crossing the maximum page number" do events = described_class.new(projects, limit: 1, offset: 15).to_a expect(events).to be_empty end - it 'allows filtering of events using an EventFilter' do + it "allows filtering of events using an EventFilter" do filter = EventFilter.new(EventFilter::ISSUE) events = described_class.new(projects, filter: filter).to_a |