Research and fix problem with build_lists#auto_publish feature. Fix specs. Refs #97
This commit is contained in:
parent
921238572b
commit
c23312ad51
|
@ -113,7 +113,7 @@ class BuildListsController < ApplicationController
|
||||||
@build_list.notified_at = Time.current
|
@build_list.notified_at = Time.current
|
||||||
@build_list.save
|
@build_list.save
|
||||||
|
|
||||||
@build_list.publish if @build_list.auto_publish # && @build_list.can_publish?
|
@build_list.delay.publish if @build_list.auto_publish # && @build_list.can_publish?
|
||||||
|
|
||||||
render :nothing => true, :status => 200
|
render :nothing => true, :status => 200
|
||||||
end
|
end
|
||||||
|
|
|
@ -246,7 +246,6 @@ ActiveRecord::Schema.define(:version => 20111228182425) do
|
||||||
t.string "object_type"
|
t.string "object_type"
|
||||||
t.integer "target_id"
|
t.integer "target_id"
|
||||||
t.string "target_type"
|
t.string "target_type"
|
||||||
t.integer "role_id"
|
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
t.string "role"
|
t.string "role"
|
||||||
|
@ -285,14 +284,14 @@ ActiveRecord::Schema.define(:version => 20111228182425) do
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.string "email", :default => "", :null => false
|
t.string "email", :default => "", :null => false
|
||||||
t.string "encrypted_password", :limit => 128, :default => "", :null => false
|
t.string "encrypted_password", :limit => 128, :default => "", :null => false
|
||||||
|
t.string "password_salt", :default => "", :null => false
|
||||||
t.string "reset_password_token"
|
t.string "reset_password_token"
|
||||||
t.datetime "reset_password_sent_at"
|
t.string "remember_token"
|
||||||
t.datetime "remember_created_at"
|
t.datetime "remember_created_at"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
t.string "uname"
|
|
||||||
t.text "ssh_key"
|
t.text "ssh_key"
|
||||||
t.integer "role_id"
|
t.string "uname"
|
||||||
t.string "role"
|
t.string "role"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -37,9 +37,9 @@ def stub_rsync_methods
|
||||||
any_instance_of(Platform, :umount_directory_for_rsync => true)
|
any_instance_of(Platform, :umount_directory_for_rsync => true)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Delayed::Worker.delay_jobs = false # Execute all jobs realtime
|
||||||
|
|
||||||
# Add testing root_path
|
# Add testing root_path
|
||||||
%x(rm -Rf #{Rails.root}/tmp/test_root)
|
%x(rm -Rf #{Rails.root}/tmp/test_root)
|
||||||
%x(mkdir -p #{Rails.root}/tmp/test_root)
|
%x(mkdir -p #{Rails.root}/tmp/test_root)
|
||||||
APP_CONFIG['root_path'] = "#{Rails.root}/tmp/test_root"
|
APP_CONFIG['root_path'] = "#{Rails.root}/tmp/test_root"
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue