Skip to content
Snippets Groups Projects
Commit 934b69f1 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

test

parent 5d179833
No related branches found
No related tags found
No related merge requests found
...@@ -54,6 +54,7 @@ gem 'summernote-rails', git: 'https://github.com/noesya/summernote-rails.git', b ...@@ -54,6 +54,7 @@ gem 'summernote-rails', git: 'https://github.com/noesya/summernote-rails.git', b
group :development, :test do group :development, :test do
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
gem 'figaro' gem 'figaro'
gem 'vcr'
end end
group :development do group :development do
......
...@@ -419,6 +419,7 @@ GEM ...@@ -419,6 +419,7 @@ GEM
unf_ext (0.0.8) unf_ext (0.0.8)
unicode-display_width (2.1.0) unicode-display_width (2.1.0)
unicode_utils (1.4.0) unicode_utils (1.4.0)
vcr (6.0.0)
warden (1.2.9) warden (1.2.9)
rack (>= 2.0.9) rack (>= 2.0.9)
web-console (4.2.0) web-console (4.2.0)
...@@ -490,6 +491,7 @@ DEPENDENCIES ...@@ -490,6 +491,7 @@ DEPENDENCIES
summernote-rails! summernote-rails!
two_factor_authentication! two_factor_authentication!
tzinfo-data tzinfo-data
vcr
web-console (>= 4.1.0) web-console (>= 4.1.0)
webdrivers webdrivers
......
test: website_with_github:
university: test university: default_university
name: Site de test name: Site de test
git_provider: github
access_token: test
website_with_gitlab:
university: default_university
name: Site with gitlab
git_provider: gitlab
access_token: test
test: test_post:
university: test university: default_university
website: test website: website_with_github
title: Test title: Test
slug: test slug: test
test: default_university:
name: Université de test name: Université de test
...@@ -5,18 +5,18 @@ class SummernoteTest < ActiveSupport::TestCase ...@@ -5,18 +5,18 @@ class SummernoteTest < ActiveSupport::TestCase
HTML_DEHYDRATED = "<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>" HTML_DEHYDRATED = "<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>"
test "dehydrate actiontext" do test "dehydrate actiontext" do
post = communication_website_post(:test) post = communication_website_post(:test_post)
post.text_new = HTML_HYDRATED post.text = HTML_HYDRATED
post.save post.save
post.reload post.reload
assert_equal HTML_DEHYDRATED, post.text_new_before_type_cast assert_equal HTML_DEHYDRATED, post.text_before_type_cast
end end
test "rehydrate actiontext" do test "rehydrate actiontext" do
post = communication_website_post(:test) post = communication_website_post(:test_post)
post.text_new = HTML_DEHYDRATED post.text = HTML_DEHYDRATED
post.save post.save
post.reload post.reload
assert_equal HTML_HYDRATED, communication_website_post(:test).text_new.to_s assert_equal HTML_HYDRATED, communication_website_post(:test_post).text.to_s
end end
end end
require "test_helper"
class GitRepositoryTest < ActiveSupport::TestCase
test "params for dan-gold.jpeg" do
end
end
require 'vcr'
VCR.configure do |c|
c.cassette_library_dir = 'test/cassettes'
c.hook_into :webmock
c.allow_http_connections_when_no_cassette = false
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment