Unit tests

This commit is contained in:
Karel Picman 2017-06-20 13:28:02 +02:00
parent 668a738d7d
commit 1e98f2e7af

View File

@ -42,10 +42,12 @@ class MyControllerTest < RedmineDmsf::Test::TestCase
@user_member.pref[:my_page_layout] = { 'top' => ['open_approvals'] }
@user_member.pref.save!
get :page
assert_response :success
assert_select 'div#list-top' do
assert_select 'h3', { :text => "#{l(:open_approvals)} (0)" }
end
assert_response :success
unless defined?(EasyExtensions)
assert_select 'div#list-top' do
assert_select 'h3', { :text => "#{l(:open_approvals)} (0)" }
end
end
end
def test_page_with_open_locked_documents
@ -53,8 +55,10 @@ class MyControllerTest < RedmineDmsf::Test::TestCase
@user_member.pref.save!
get :page
assert_response :success
assert_select 'div#list-top' do
assert_select 'h3', { :text => "#{l(:locked_documents)} (0/1)" }
unless defined?(EasyExtensions)
assert_select 'div#list-top' do
assert_select 'h3', { :text => "#{l(:locked_documents)} (0/1)" }
end
end
end