From 505f3f7c03081a629512a8ca58dd9f970f630896 Mon Sep 17 00:00:00 2001 From: r888888888 Date: Wed, 15 Jun 2016 11:16:40 -0700 Subject: [PATCH] fixes #2609: BUR is impossible to approve --- app/models/bulk_update_request.rb | 2 +- test/functional/bulk_update_requests_controller_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/bulk_update_request.rb b/app/models/bulk_update_request.rb index a6e7e5081..cafda40ba 100644 --- a/app/models/bulk_update_request.rb +++ b/app/models/bulk_update_request.rb @@ -11,7 +11,7 @@ class BulkUpdateRequest < ActiveRecord::Base validates_inclusion_of :status, :in => %w(pending approved rejected) validate :script_formatted_correctly validate :forum_topic_id_not_invalid - validate :validate_script + validate :validate_script, :on => :create attr_accessible :user_id, :forum_topic_id, :script, :title, :reason, :skip_secondary_validations attr_accessible :status, :approver_id, :as => [:admin] before_validation :initialize_attributes, :on => :create diff --git a/test/functional/bulk_update_requests_controller_test.rb b/test/functional/bulk_update_requests_controller_test.rb index 6b30cb058..f3c40980d 100644 --- a/test/functional/bulk_update_requests_controller_test.rb +++ b/test/functional/bulk_update_requests_controller_test.rb @@ -106,7 +106,7 @@ class BulkUpdateRequestsControllerTest < ActionController::TestCase end end - context "for an admin" do + context "1234 for an admin" do should "succeed" do post :approve, {:id => @bulk_update_request.id}, {:user_id => @admin.id} @bulk_update_request.reload