mirror of
https://github.com/we-promise/sure.git
synced 2026-04-17 19:14:11 +00:00
Sync notifications and troubleshooting guides (#998)
* Add help articles * Broadcast sync messages as notifications * Lint fixes * more lint fixes * Remove redundant code
This commit is contained in:
21
test/models/help/article_test.rb
Normal file
21
test/models/help/article_test.rb
Normal file
@@ -0,0 +1,21 @@
|
||||
require "test_helper"
|
||||
|
||||
class Help::ArticleTest < ActiveSupport::TestCase
|
||||
include ActiveJob::TestHelper
|
||||
|
||||
setup do
|
||||
Help::Article.stubs(:root_path).returns(Rails.root.join("test", "fixtures", "files"))
|
||||
end
|
||||
|
||||
test "returns nil if article not found" do
|
||||
assert_nil Help::Article.find("missing")
|
||||
end
|
||||
|
||||
test "find and renders markdown article" do
|
||||
article = Help::Article.find("placeholder")
|
||||
|
||||
assert_equal "Placeholder", article.title
|
||||
assert_equal "Test help article", article.content
|
||||
assert_equal "<p>Test help article</p>\n", article.html
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user