From 7b6242bfbb52486318d0136d230bc2c5790a52dd Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 29 Mar 2017 12:24:46 -0400 Subject: [PATCH] Minor cleanup of `/users/` rename --- spec/models/post_spec.rb | 2 +- test/javascripts/lib/url-test.js.es6 | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/spec/models/post_spec.rb b/spec/models/post_spec.rb index 208414e1a93..09d7e533be0 100644 --- a/spec/models/post_spec.rb +++ b/spec/models/post_spec.rb @@ -952,7 +952,7 @@ describe Post do it "will unhide the post but will keep the topic invisible/unlisted" do hidden_topic = Fabricate(:topic, visible: false) - _first_post = create_post(topic: hidden_topic) + create_post(topic: hidden_topic) second_post = create_post(topic: hidden_topic) second_post.update_columns(hidden: true, hidden_at: Time.now, hidden_reason_id: 1) diff --git a/test/javascripts/lib/url-test.js.es6 b/test/javascripts/lib/url-test.js.es6 index d64adb6e389..dd938b5d0c4 100644 --- a/test/javascripts/lib/url-test.js.es6 +++ b/test/javascripts/lib/url-test.js.es6 @@ -31,3 +31,10 @@ test("userPath", assert => { assert.equal(userPath('eviltrout'), '/u/eviltrout'); assert.equal(userPath('hp.json'), '/u/hp.json'); }); + +test("userPath with BaseUri", assert => { + Discourse.BaseUri = "/forum"; + assert.equal(userPath(), '/forum/u'); + assert.equal(userPath('eviltrout'), '/forum/u/eviltrout'); + assert.equal(userPath('hp.json'), '/forum/u/hp.json'); +});