about summary refs log tree commit diff
path: root/spec/controllers/admin/report_notes_controller_spec.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-01-17 09:41:33 +0100
committerGitHub <noreply@github.com>2022-01-17 09:41:33 +0100
commit14f436c457560862fafabd753eb314c8b8a8e674 (patch)
tree905e62fd68c52efc9eec5b63d7170eee0c0c93a7 /spec/controllers/admin/report_notes_controller_spec.rb
parentd5c9feb7b7fc489afbd0a287431fe07b42451ef0 (diff)
Add notifications for statuses deleted by moderators (#17204)
Diffstat (limited to 'spec/controllers/admin/report_notes_controller_spec.rb')
-rw-r--r--spec/controllers/admin/report_notes_controller_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/controllers/admin/report_notes_controller_spec.rb b/spec/controllers/admin/report_notes_controller_spec.rb
index ec5872c7d..c0013f41a 100644
--- a/spec/controllers/admin/report_notes_controller_spec.rb
+++ b/spec/controllers/admin/report_notes_controller_spec.rb
@@ -12,11 +12,11 @@ describe Admin::ReportNotesController do
   describe 'POST #create' do
     subject { post :create, params: params }
 
-    let(:report) { Fabricate(:report, action_taken: action_taken, action_taken_by_account_id: account_id) }
+    let(:report) { Fabricate(:report, action_taken_at: action_taken, action_taken_by_account_id: account_id) }
 
     context 'when parameter is valid' do
       context 'when report is unsolved' do
-        let(:action_taken) { false }
+        let(:action_taken) { nil }
         let(:account_id) { nil }
 
         context 'when create_and_resolve flag is on' do
@@ -41,7 +41,7 @@ describe Admin::ReportNotesController do
       end
 
       context 'when report is resolved' do
-        let(:action_taken) { true }
+        let(:action_taken) { Time.now.utc }
         let(:account_id) { user.account.id }
 
         context 'when create_and_unresolve flag is on' do
@@ -68,7 +68,7 @@ describe Admin::ReportNotesController do
 
     context 'when parameter is invalid' do
       let(:params) { { report_note: { content: '', report_id: report.id } } }
-      let(:action_taken) { false }
+      let(:action_taken) { nil }
       let(:account_id) { nil }
 
       it 'renders admin/reports/show' do