From cb8fd0c8aaa33c122bc57c125d019e739cb19c49 Mon Sep 17 00:00:00 2001
From: Arnaud Levy <contact@arnaudlevy.com>
Date: Mon, 14 Feb 2022 12:40:38 +0100
Subject: [PATCH] cleanup

---
 test/fixtures/communication/website/post.yml         | 2 --
 test/{models => integration}/summernote_test.rb      | 4 ++++
 test/{models => integration}/variant_service_test.rb | 0
 test/{models => integration}/wordpress_test.rb       | 0
 test/{integration => models}/.keep                   | 0
 5 files changed, 4 insertions(+), 2 deletions(-)
 rename test/{models => integration}/summernote_test.rb (90%)
 rename test/{models => integration}/variant_service_test.rb (100%)
 rename test/{models => integration}/wordpress_test.rb (100%)
 rename test/{integration => models}/.keep (100%)

diff --git a/test/fixtures/communication/website/post.yml b/test/fixtures/communication/website/post.yml
index 0c08b41e6..acb62a96a 100644
--- a/test/fixtures/communication/website/post.yml
+++ b/test/fixtures/communication/website/post.yml
@@ -3,5 +3,3 @@ test:
   website: test
   title: Test
   slug: test
-  text_new: >
-    <action-text-attachment sgid="sgid" content-type="image/jpeg" url="http://localhost:3000/dan-gold.jpeg" filename="test.jpg" filesize="352931" width="588" height="746" previewable="true" presentation="gallery"></action-text-attachment>
diff --git a/test/models/summernote_test.rb b/test/integration/summernote_test.rb
similarity index 90%
rename from test/models/summernote_test.rb
rename to test/integration/summernote_test.rb
index e60cf8268..43cef8518 100644
--- a/test/models/summernote_test.rb
+++ b/test/integration/summernote_test.rb
@@ -13,6 +13,10 @@ class SummernoteTest < ActiveSupport::TestCase
   end
 
   test "rehydrate actiontext" do
+    post = communication_website_post(:test)
+    post.text_new = HTML_DEHYDRATED
+    post.save
+    post.reload
     assert_equal HTML_HYDRATED, communication_website_post(:test).text_new.to_s
   end
  end
diff --git a/test/models/variant_service_test.rb b/test/integration/variant_service_test.rb
similarity index 100%
rename from test/models/variant_service_test.rb
rename to test/integration/variant_service_test.rb
diff --git a/test/models/wordpress_test.rb b/test/integration/wordpress_test.rb
similarity index 100%
rename from test/models/wordpress_test.rb
rename to test/integration/wordpress_test.rb
diff --git a/test/integration/.keep b/test/models/.keep
similarity index 100%
rename from test/integration/.keep
rename to test/models/.keep
-- 
GitLab