From 94efd2e649f8556652c4ad0a08cc518628307f95 Mon Sep 17 00:00:00 2001 From: Anton Ignatov Date: Tue, 2 Apr 2019 16:04:50 +0200 Subject: [PATCH] Fix tests --- app/controllers/api/v1/results_controller.rb | 2 +- spec/requests/api/v1/results_controller_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/v1/results_controller.rb b/app/controllers/api/v1/results_controller.rb index ccb51a6b3..f0dfcfa96 100644 --- a/app/controllers/api/v1/results_controller.rb +++ b/app/controllers/api/v1/results_controller.rb @@ -96,7 +96,7 @@ module Api end file_tokens = prms.map { |p| p[:attributes][:file_token] } result_text_params[:text].scan( - /data-token="(\w+)"/ + /data-mce-token="(\w+)"/ ).flatten.each do |token| unless file_tokens.include?(token) raise ActiveRecord::RecordInvalid, diff --git a/spec/requests/api/v1/results_controller_spec.rb b/spec/requests/api/v1/results_controller_spec.rb index e815c8080..97a7250b3 100644 --- a/spec/requests/api/v1/results_controller_spec.rb +++ b/spec/requests/api/v1/results_controller_spec.rb @@ -128,7 +128,7 @@ RSpec.describe "Api::V1::ResultsController", type: :request do attributes: { text: 'Result text 1 ' + 'QVQIHWP8//8/AwMDExADAQAkBgMBOOSShwAAAABJRU5ErkJggg==" data-mce-token="a1">' } }, { type: 'tiny_mce_assets', attributes: {