File: epic_issues_spec.rb

package info (click to toggle)
ruby-gitlab 5.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,660 kB
  • sloc: ruby: 12,582; makefile: 7; sh: 4
file content (23 lines) | stat: -rw-r--r-- 629 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Gitlab::Client do
  describe '.epic_issues' do
    before do
      stub_get('/groups/7/epics/3/issues', 'epic_issues')
      @issues = Gitlab.epic_issues(7, 3)
    end

    it 'gets the correct resource' do
      expect(a_get('/groups/7/epics/3/issues')).to have_been_made
    end

    it "returns a paginated response of project's issues" do
      expect(@issues).to be_a Gitlab::PaginatedResponse
      expect(@issues.first.epic.group_id).to eq(7)
      expect(@issues.first.epic.iid).to eq(3)
      expect(@issues.first.epic_iid).to eq(3)
    end
  end
end