projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
6465: Added comments to explain test "find a project and edit description
[arvados.git]
/
apps
/
workbench
/
test
/
controllers
/
projects_controller_test.rb
diff --git
a/apps/workbench/test/controllers/projects_controller_test.rb
b/apps/workbench/test/controllers/projects_controller_test.rb
index a036a8f4f6bdb04603ded2e826492a4ffd9f4b89..4be4c089a2864f85b61bff83064a54d1a366e8cd 100644
(file)
--- a/
apps/workbench/test/controllers/projects_controller_test.rb
+++ b/
apps/workbench/test/controllers/projects_controller_test.rb
@@
-334,19
+334,21
@@
class ProjectsControllerTest < ActionController::TestCase
found.description = 'Textile description with link to home page <a href="/">take me home</a>.'
found.save!
get(:show, {id: project['uuid']}, session_for(:active))
found.description = 'Textile description with link to home page <a href="/">take me home</a>.'
found.save!
get(:show, {id: project['uuid']}, session_for(:active))
- assert_not_includes 'Textile description with link to home page <a href="/">take me home</a>.', @response.body
- assert_match /Textile description with link to home page .*a href=.*take me home.*\/a.*./, @response.body
+ assert_includes @response.body, 'Textile description with link to home page <a href="/">take me home</a>.'
end
test "find a project and edit description to textile description with link to object" do
project = api_fixture('groups')['aproject']
use_token :active
found = Group.find(project['uuid'])
end
test "find a project and edit description to textile description with link to object" do
project = api_fixture('groups')['aproject']
use_token :active
found = Group.find(project['uuid'])
+
+ # uses 'Link to object' as a hyperlink for the object
found.description = '"Link to object":' + api_fixture('groups')['asubproject']['uuid']
found.save!
get(:show, {id: project['uuid']}, session_for(:active))
found.description = '"Link to object":' + api_fixture('groups')['asubproject']['uuid']
found.save!
get(:show, {id: project['uuid']}, session_for(:active))
- assert_not_includes '"Link to object"', @response.body
- assert_match /href=.*Link to object.*\/a./, @response.body
+
+ # check that input was converted to textile, not staying as inputted
+ refute_includes @response.body,'"Link to object"'
refute_empty css_select('[href="/groups/zzzzz-j7d0g-axqo7eu9pwvna1x"]')
end
refute_empty css_select('[href="/groups/zzzzz-j7d0g-axqo7eu9pwvna1x"]')
end