diff --git a/app/models/build_list.rb b/app/models/build_list.rb index 12713e97b..a27f67751 100644 --- a/app/models/build_list.rb +++ b/app/models/build_list.rb @@ -235,7 +235,7 @@ class BuildList < ActiveRecord::Base end 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 HUMAN_CONTAINER_STATUSES.each do |code,name| diff --git a/spec/controllers/api/v1/build_lists_controller_spec.rb b/spec/controllers/api/v1/build_lists_controller_spec.rb index 63c970f03..ebfcf29b6 100644 --- a/spec/controllers/api/v1/build_lists_controller_spec.rb +++ b/spec/controllers/api/v1/build_lists_controller_spec.rb @@ -76,6 +76,7 @@ end describe Api::V1::BuildListsController do before(:each) do stub_symlink_methods + stub_redis end context 'create and update abilities' do diff --git a/spec/factories/build_lists.rb b/spec/factories/build_lists.rb index cc2a11226..04ad0a0e6 100644 --- a/spec/factories/build_lists.rb +++ b/spec/factories/build_lists.rb @@ -10,7 +10,7 @@ FactoryGirl.define do pr } association :arch - new_core false + new_core true build_for_platform {|bl| bl.save_to_platform} save_to_repository {|bl| bl.save_to_platform.repositories.first} update_type 'security' @@ -47,6 +47,7 @@ FactoryGirl.define do name "test_package" version "3.1.12" release 6 + sha1 '4faae977e8b12baa267b566d2bec6e6182754ec4' package_type "source" end end diff --git a/spec/models/build_list_spec.rb b/spec/models/build_list_spec.rb index 9e6172c4d..ab3684638 100644 --- a/spec/models/build_list_spec.rb +++ b/spec/models/build_list_spec.rb @@ -26,12 +26,12 @@ describe BuildList do :project => build_list.project) } - before(:all) { ActionMailer::Base.deliveries = [] } + before { ActionMailer::Base.deliveries = [] } before do build_list.update_attributes({:commit_hash => build_list.project.repo.commits('master').last.id, :status => BuildList::BUILD_STARTED}, :without_protection => true) end - after { ActionMailer::Base.deliveries = [] } + after(:all) { ActionMailer::Base.deliveries = [] } shared_examples_for 'build list notifications by email' do it "gets notification by email when status - Build complete" do