Sha256: 61cac6a6180d26b8a78580e660446c7cf73e2b90e6718b400df1c19ff8ee3af4

Contents?: true

Size: 718 Bytes

Versions: 1

Compression:

Stored size: 718 Bytes

Contents

require_relative '../spec_helper'

module Kamerling describe Registrar do
  describe '#register' do
    fakes :addr, :client, :project, :repo

    it 'registers that the given client can do the given project' do
      repos = {
        Client       => { client.uuid  => client  },
        Project      => { project.uuid => project },
        Registration => repo,
      }
      Registrar.new.register addr: addr, client_uuid: client.uuid,
                             project_uuid: project.uuid, repos: repos
      registration = Registration.new addr: addr, client: client,
                                      project: project, uuid: anything
      repo.must_have_received :<<, [registration]
    end
  end
end end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kamerling-0.0.2 spec/kamerling/registrar_spec.rb