Merge pull request #806 from warpc/new_core_for_mass_build
New core for mass build (addon)
This commit is contained in:
commit
057be1836d
|
@ -0,0 +1,5 @@
|
||||||
|
class AddNewCoreToMassBuild < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :mass_builds, :new_core, :boolean, :default => false
|
||||||
|
end
|
||||||
|
end
|
|
@ -16,8 +16,8 @@ describe BuildList do
|
||||||
|
|
||||||
before(:all) { ActionMailer::Base.deliveries = [] }
|
before(:all) { 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 => BuildServer::BUILD_STARTED,)
|
:status => BuildServer::BUILD_STARTED}, :without_protection => true)
|
||||||
end
|
end
|
||||||
after { ActionMailer::Base.deliveries = [] }
|
after { ActionMailer::Base.deliveries = [] }
|
||||||
|
|
||||||
|
@ -39,25 +39,25 @@ describe BuildList do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "gets notification by email when status - Failed publish" do
|
it "gets notification by email when status - Failed publish" do
|
||||||
build_list.update_attributes(:status => BuildList::BUILD_PUBLISH)
|
build_list.update_attributes({:status => BuildList::BUILD_PUBLISH}, :without_protection => true)
|
||||||
build_list.fail_publish
|
build_list.fail_publish
|
||||||
should have(1).item
|
should have(1).item
|
||||||
end
|
end
|
||||||
|
|
||||||
it "gets notification by email when auto_publish and status - Failed publish" do
|
it "gets notification by email when auto_publish and status - Failed publish" do
|
||||||
build_list.update_attributes(:auto_publish => true, :status => BuildList::BUILD_PUBLISH)
|
build_list.update_attributes({:auto_publish => true, :status => BuildList::BUILD_PUBLISH}, :without_protection => true)
|
||||||
build_list.fail_publish
|
build_list.fail_publish
|
||||||
should have(1).item
|
should have(1).item
|
||||||
end
|
end
|
||||||
|
|
||||||
it "gets notification by email when status - Build published" do
|
it "gets notification by email when status - Build published" do
|
||||||
build_list.update_attributes(:status => BuildList::BUILD_PUBLISH)
|
build_list.update_attributes({:status => BuildList::BUILD_PUBLISH}, :without_protection => true)
|
||||||
build_list.published
|
build_list.published
|
||||||
should have(1).item
|
should have(1).item
|
||||||
end
|
end
|
||||||
|
|
||||||
it "gets notification by email when auto_publish and status - Build published" do
|
it "gets notification by email when auto_publish and status - Build published" do
|
||||||
build_list.update_attributes(:auto_publish => true, :status => BuildList::BUILD_PUBLISH)
|
build_list.update_attributes({:auto_publish => true, :status => BuildList::BUILD_PUBLISH}, :without_protection => true)
|
||||||
build_list.published
|
build_list.published
|
||||||
should have(1).item
|
should have(1).item
|
||||||
end
|
end
|
||||||
|
@ -69,7 +69,7 @@ describe BuildList do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "doesn't get notification by email when mass build" do
|
it "doesn't get notification by email when mass build" do
|
||||||
build_list.update_attributes(:mass_build_id => 1, :status => BuildList::BUILD_PUBLISH)
|
build_list.update_attributes({:mass_build_id => 1, :status => BuildList::BUILD_PUBLISH}, :without_protection => true)
|
||||||
build_list.published
|
build_list.published
|
||||||
should have(:no).items
|
should have(:no).items
|
||||||
end
|
end
|
||||||
|
@ -133,8 +133,8 @@ describe BuildList do
|
||||||
:auto_publish => true,
|
:auto_publish => true,
|
||||||
:project => FactoryGirl.create(:project_with_commit, :owner => user))
|
:project => FactoryGirl.create(:project_with_commit, :owner => user))
|
||||||
FactoryGirl.create(:build_list_package, :build_list => bl, :project => bl.project)
|
FactoryGirl.create(:build_list_package, :build_list => bl, :project => bl.project)
|
||||||
bl.update_attributes(:commit_hash => bl.project.repo.commits('master').last.id,
|
bl.update_attributes({:commit_hash => bl.project.repo.commits('master').last.id,
|
||||||
:status => BuildList::BUILD_PUBLISH)
|
:status => BuildList::BUILD_PUBLISH}, :without_protection => true)
|
||||||
bl.published
|
bl.published
|
||||||
should have(1).item
|
should have(1).item
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue