#403: Fixed: project_spec
This commit is contained in:
parent
0d1af0e276
commit
f5ebc43e2d
|
@ -167,17 +167,23 @@ describe Project do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it '#run_mass_import' do
|
context '#run_mass_import' do
|
||||||
owner = FactoryGirl.create(:user)
|
before { WebMock.allow_net_connect! }
|
||||||
repository = FactoryGirl.create(:repository)
|
after { WebMock.disable_net_connect! }
|
||||||
url = 'http://abf-downloads.rosalinux.ru/abf_personal/repository/test-mass-import'
|
|
||||||
visibility = 'open'
|
|
||||||
|
|
||||||
Project.run_mass_import(url, "abf-worker-service-1-3.src.rpm\nredir-2.2.1-7.res6.src.rpm\n", visibility, owner, repository.id)
|
it 'success' do
|
||||||
|
owner = FactoryGirl.create(:user)
|
||||||
|
repository = FactoryGirl.create(:repository)
|
||||||
|
url = 'http://abf-downloads.rosalinux.ru/abf_personal/repository/test-mass-import'
|
||||||
|
visibility = 'open'
|
||||||
|
|
||||||
Project.count.should == 2
|
|
||||||
repository.projects.should have(2).items
|
Project.run_mass_import(url, "abf-worker-service-1-3.src.rpm\nredir-2.2.1-7.res6.src.rpm\n", visibility, owner, repository.id)
|
||||||
owner.projects.should have(2).items
|
|
||||||
|
Project.count.should == 2
|
||||||
|
repository.projects.should have(2).items
|
||||||
|
owner.projects.should have(2).items
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
shared_examples_for 'autostart build_lists' do |once_a_12_hours, once_a_day, once_a_week|
|
shared_examples_for 'autostart build_lists' do |once_a_12_hours, once_a_day, once_a_week|
|
||||||
|
|
Loading…
Reference in New Issue