Fix tests

This commit is contained in:
Anton Ignatov 2019-04-02 16:04:50 +02:00
parent c9f9523210
commit 94efd2e649
2 changed files with 2 additions and 2 deletions

View file

@ -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,

View file

@ -128,7 +128,7 @@ RSpec.describe "Api::V1::ResultsController", type: :request do
attributes: {
text: 'Result text 1 <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAA'\
'AACCAIAAAD91JpzAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAE0lE'\
'QVQIHWP8//8/AwMDExADAQAkBgMBOOSShwAAAABJRU5ErkJggg==" data-token="a1">'
'QVQIHWP8//8/AwMDExADAQAkBgMBOOSShwAAAABJRU5ErkJggg==" data-mce-token="a1">'
} },
{ type: 'tiny_mce_assets',
attributes: {