gitolite_spec.rb 736 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
require 'spec_helper'

describe Gitlab::Gitolite do
  let(:project) { double('Project', path: 'diaspora') }
  let(:gitolite_config) { double('Gitlab::GitoliteConfig') }
  let(:gitolite) { Gitlab::Gitolite.new }

  before do
    gitolite.stub(config: gitolite_config)
  end

  it { should respond_to :set_key }
  it { should respond_to :remove_key }

  it { should respond_to :update_repository }
  it { should respond_to :create_repository }
  it { should respond_to :remove_repository }

19
  it { gitolite.url_to_repo('diaspora').should == Gitlab.config.gitolite.ssh_path_prefix + "diaspora.git" }
20 21 22 23 24 25

  it "should call config update" do
    gitolite_config.should_receive(:update_project!)
    gitolite.update_repository project
  end
end