Sha256: c52693d0f2c379aaf6e15c852dd47e444bd133e0b16b0fbe7b7818474bd5b897

Contents?: true

Size: 570 Bytes

Versions: 7

Compression:

Stored size: 570 Bytes

Contents

require 'spec_helper'

describe Gitlab::Client do
  it { should respond_to :namespaces }

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

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

    it "should return 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

7 entries across 7 versions & 2 rubygems

Version Path
gitlab-4.2.0 spec/gitlab/client/namespaces_spec.rb
gitlab-4.1.0 spec/gitlab/client/namespaces_spec.rb
gitlab-4.0.0 spec/gitlab/client/namespaces_spec.rb
gitlab-akerl-4.0.0 spec/gitlab/client/namespaces_spec.rb
gitlab-3.7.0 spec/gitlab/client/namespaces_spec.rb
gitlab-3.6.1 spec/gitlab/client/namespaces_spec.rb
gitlab-3.6.0 spec/gitlab/client/namespaces_spec.rb