Next try to fix user wiki tests

This commit is contained in:
Alexander Meindl
2016-06-15 19:20:52 +02:00
parent 7fe0a81b8a
commit 026ed1cfaf

View File

@@ -160,35 +160,35 @@ class WikiControllerTest < ActionController::TestCase
def test_show_issue def test_show_issue
@request.session[:user_id] = 1 @request.session[:user_id] = 1
@page.content.text = '{{issue(1, format=short)}}' @page.content.text = '{{issue(2, format=short)}}'
@page.content.save! @page.content.save!
get :show, project_id: 1, id: @page_name get :show, project_id: 1, id: @page_name
assert_response :success assert_response :success
assert_template 'show' assert_template 'show'
assert_select 'a[href=?]', '/issues/1', assert_select 'a[href=?]', '/issues/2',
text: 'Can\'t print recipes' text: 'Add ingredients categories'
end end
def test_show_issue_with_id def test_show_issue_with_id
@request.session[:user_id] = 1 @request.session[:user_id] = 1
@page.content.text = '{{issue(1, format=link)}}' @page.content.text = '{{issue(2, format=link)}}'
@page.content.save! @page.content.save!
get :show, project_id: 1, id: @page_name get :show, project_id: 1, id: @page_name
assert_response :success assert_response :success
assert_template 'show' assert_template 'show'
assert_select 'a[href=?]', '/issues/1', assert_select 'a[href=?]', '/issues/2',
text: 'Can\'t print recipes #1' text: 'Add ingredients categories #2'
end end
def test_show_issue_with_id_default def test_show_issue_with_id_default
@request.session[:user_id] = 1 @request.session[:user_id] = 1
@page.content.text = '{{issue(1)}}' @page.content.text = '{{issue(2)}}'
@page.content.save! @page.content.save!
get :show, project_id: 1, id: @page_name get :show, project_id: 1, id: @page_name
assert_response :success assert_response :success
assert_template 'show' assert_template 'show'
assert_select 'a[href=?]', '/issues/1', assert_select 'a[href=?]', '/issues/2',
text: 'Can\'t print recipes #1' text: 'Add ingredients categories #2'
end end
def test_show_user_with_id def test_show_user_with_id