Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitignores_spec.rb « api « requests « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: aab2d8c81b997ba7b37f0e9911b7158cb7abb0f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
require 'spec_helper'

describe API::Gitignores, api: true  do
  include ApiHelpers

  describe 'Entity Gitignore' do
    before { get api('/gitignores/Ruby') }

    it { expect(json_response['name']).to eq('Ruby') }
    it { expect(json_response['content']).to include('*.gem') }
  end

  describe 'Entity GitignoresList' do
    before { get api('/gitignores') }

    it { expect(json_response.first['name']).not_to be_nil }
    it { expect(json_response.first['content']).to be_nil }
  end

  describe 'GET /gitignores' do
    it 'returns a list of available license templates' do
      get api('/gitignores')

      expect(response.status).to eq(200)
      expect(json_response).to be_an Array
      expect(json_response.size).to be > 15
    end
  end
end