#860: update specs

This commit is contained in:
Vokhmin Alexey V 2013-01-29 17:17:35 +04:00
parent 52cd67e1c3
commit 499d8e2fa8
4 changed files with 6 additions and 4 deletions

View File

@ -235,7 +235,7 @@ class BuildList < ActiveRecord::Base
end end
event :destroy_container do event :destroy_container do
transition [:container_failed_publish, :container_published] => :waiting_for_publish transition [:container_failed_publish, :container_published, :waiting_for_publish] => :waiting_for_publish
end end
HUMAN_CONTAINER_STATUSES.each do |code,name| HUMAN_CONTAINER_STATUSES.each do |code,name|

View File

@ -76,6 +76,7 @@ end
describe Api::V1::BuildListsController do describe Api::V1::BuildListsController do
before(:each) do before(:each) do
stub_symlink_methods stub_symlink_methods
stub_redis
end end
context 'create and update abilities' do context 'create and update abilities' do

View File

@ -10,7 +10,7 @@ FactoryGirl.define do
pr pr
} }
association :arch association :arch
new_core false new_core true
build_for_platform {|bl| bl.save_to_platform} build_for_platform {|bl| bl.save_to_platform}
save_to_repository {|bl| bl.save_to_platform.repositories.first} save_to_repository {|bl| bl.save_to_platform.repositories.first}
update_type 'security' update_type 'security'
@ -47,6 +47,7 @@ FactoryGirl.define do
name "test_package" name "test_package"
version "3.1.12" version "3.1.12"
release 6 release 6
sha1 '4faae977e8b12baa267b566d2bec6e6182754ec4'
package_type "source" package_type "source"
end end
end end

View File

@ -26,12 +26,12 @@ describe BuildList do
:project => build_list.project) } :project => build_list.project) }
before(:all) { ActionMailer::Base.deliveries = [] } before { ActionMailer::Base.deliveries = [] }
before do before do
build_list.update_attributes({:commit_hash => build_list.project.repo.commits('master').last.id, build_list.update_attributes({:commit_hash => build_list.project.repo.commits('master').last.id,
:status => BuildList::BUILD_STARTED}, :without_protection => true) :status => BuildList::BUILD_STARTED}, :without_protection => true)
end end
after { ActionMailer::Base.deliveries = [] } after(:all) { ActionMailer::Base.deliveries = [] }
shared_examples_for 'build list notifications by email' do shared_examples_for 'build list notifications by email' do
it "gets notification by email when status - Build complete" do it "gets notification by email when status - Build complete" do