89a126810703c666309310d0f3189e9834d70b5bTimo Sirainenrequire 'spec_helper'
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen let(:user){ create(:permission, role: 'owner', item: repository).subject }
3ccfcf0856958cb9208a9fc51c3bdf13c58ad52aTimo Sirainen before { delete :destroy, id: repository.to_param }
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen importing = create :ontology, repository: importing_repository
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen create :import_mapping, target: importing, source: ontology
3fe44a0df5a0bdd80c495f79cbf0e384441d6fccTimo Sirainen it { should render_template 'repositories/_repository' }
3ccfcf0856958cb9208a9fc51c3bdf13c58ad52aTimo Sirainen context 'requesting standard representation' do
3ccfcf0856958cb9208a9fc51c3bdf13c58ad52aTimo Sirainen context 'creating a clone', :process_jobs_synchronously do
8a1c866a4c429f26c8746525f82024bc387f1407Timo Sirainen let(:git_repository) { create :git_repository }
3fe44a0df5a0bdd80c495f79cbf0e384441d6fccTimo Sirainen source_address: "file://#{git_repository.path}",
3ccfcf0856958cb9208a9fc51c3bdf13c58ad52aTimo Sirainen it { response.should redirect_to Repository.find_by_path('repo') }
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen it 'should have created a mirrored repository' do
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen expect(Repository.find_by_path('repo').mirror?).to be_truthy
3ccfcf0856958cb9208a9fc51c3bdf13c58ad52aTimo Sirainen source_address: "file://#{git_repository.path}",
3ccfcf0856958cb9208a9fc51c3bdf13c58ad52aTimo Sirainen it { response.should redirect_to Repository.find_by_path('repo') }
3ccfcf0856958cb9208a9fc51c3bdf13c58ad52aTimo Sirainen it 'should have created a non-mirrored repository' do