Sha256: c20130f51c625463384941af63463b2e55f3d129e9f75b5aae23ccd2f37c263e

Contents?: true

Size: 566 Bytes

Versions: 2

Compression:

Stored size: 566 Bytes

Contents

require 'spec_helper'

describe Gitlab::Client do
  it { is_expected.to respond_to :namespaces }

  describe ".namespaces" do
    before do
      stub_get("/namespaces", "namespaces")
      @namespaces = Gitlab.namespaces
    end

    it "gets the correct resource" do
      expect(a_get("/namespaces")).to have_been_made
    end

    it "returns a paginated response of namespaces" do
      expect(@namespaces).to be_a Gitlab::PaginatedResponse
      expect(@namespaces.first.path).to eq("john")
      expect(@namespaces.first.kind).to eq("user")
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gitlab-4.4.0 spec/gitlab/client/namespaces_spec.rb
gitlab-4.3.0 spec/gitlab/client/namespaces_spec.rb