aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xapp/helpers/link_to_helper.rb2
-rw-r--r--spec/helpers/link_to_helper_spec.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/app/helpers/link_to_helper.rb b/app/helpers/link_to_helper.rb
index c8ad7bc30..4a73b13de 100755
--- a/app/helpers/link_to_helper.rb
+++ b/app/helpers/link_to_helper.rb
@@ -222,7 +222,7 @@ module LinkToHelper
# Admin pages
def admin_url(relative_path)
admin_url_prefix = Configuration::admin_base_url
- admin_url_prefix = admin_general_index_path+"/" if admin_url_prefix.empty?
+ admin_url_prefix = admin_general_index_url + "/" if admin_url_prefix.empty?
return admin_url_prefix + relative_path
end
diff --git a/spec/helpers/link_to_helper_spec.rb b/spec/helpers/link_to_helper_spec.rb
index 098fba008..ef89e8bf9 100644
--- a/spec/helpers/link_to_helper_spec.rb
+++ b/spec/helpers/link_to_helper_spec.rb
@@ -51,11 +51,11 @@ describe LinkToHelper do
describe 'admin_url' do
context 'with no ADMIN_BASE_URL set' do
it 'should prepend the admin general index path to a simple string' do
- admin_url('unclassified').should == '/en/admin/unclassified'
+ admin_url('unclassified').should == 'http://test.host/en/admin/unclassified'
end
it 'should prepend the admin general index path to a deeper URL' do
- admin_url('request/show/123').should == '/en/admin/request/show/123'
+ admin_url('request/show/123').should == 'http://test.host/en/admin/request/show/123'
end
end