Merge branch 'next-minor' into develop
This commit is contained in:
commit
c2a66966f2
3 changed files with 25 additions and 6 deletions
4
Gemfile
4
Gemfile
|
|
@ -94,9 +94,9 @@ gem "js-routes", "1.2.9"
|
|||
source "https://rails-assets.org" do
|
||||
gem "rails-assets-jquery", "2.2.4" # Should be kept in sync with jquery-rails
|
||||
|
||||
gem "rails-assets-markdown-it", "8.0.0"
|
||||
gem "rails-assets-markdown-it", "8.2.2"
|
||||
gem "rails-assets-markdown-it-hashtag", "0.4.0"
|
||||
gem "rails-assets-markdown-it-diaspora-mention", "1.0.0"
|
||||
gem "rails-assets-markdown-it-diaspora-mention", "1.1.0"
|
||||
gem "rails-assets-markdown-it-sanitizer", "0.4.3"
|
||||
gem "rails-assets-markdown-it--markdown-it-for-inline", "0.1.1"
|
||||
gem "rails-assets-markdown-it-sub", "1.0.0"
|
||||
|
|
|
|||
|
|
@ -665,8 +665,8 @@ GEM
|
|||
rails-assets-jquery.ui (1.11.4)
|
||||
rails-assets-jquery (>= 1.6)
|
||||
rails-assets-markdown-it--markdown-it-for-inline (0.1.1)
|
||||
rails-assets-markdown-it (8.0.0)
|
||||
rails-assets-markdown-it-diaspora-mention (1.0.0)
|
||||
rails-assets-markdown-it (8.2.2)
|
||||
rails-assets-markdown-it-diaspora-mention (1.1.0)
|
||||
rails-assets-markdown-it-hashtag (0.4.0)
|
||||
rails-assets-markdown-it-sanitizer (0.4.3)
|
||||
rails-assets-markdown-it-sub (1.0.0)
|
||||
|
|
@ -1000,9 +1000,9 @@ DEPENDENCIES
|
|||
rails-assets-jquery (= 2.2.4)!
|
||||
rails-assets-jquery-placeholder (= 2.3.1)!
|
||||
rails-assets-jquery-textchange (= 0.2.3)!
|
||||
rails-assets-markdown-it (= 8.0.0)!
|
||||
rails-assets-markdown-it (= 8.2.2)!
|
||||
rails-assets-markdown-it--markdown-it-for-inline (= 0.1.1)!
|
||||
rails-assets-markdown-it-diaspora-mention (= 1.0.0)!
|
||||
rails-assets-markdown-it-diaspora-mention (= 1.1.0)!
|
||||
rails-assets-markdown-it-hashtag (= 0.4.0)!
|
||||
rails-assets-markdown-it-sanitizer (= 0.4.3)!
|
||||
rails-assets-markdown-it-sub (= 1.0.0)!
|
||||
|
|
|
|||
|
|
@ -86,6 +86,25 @@ describe("app.helpers.textFormatter", function(){
|
|||
expect(wrapper.find("a[href='/people/" + this.alice.guid + "']")).not.toHaveClass('hovercardable');
|
||||
expect(wrapper.find("a[href='/people/" + this.bob.guid + "']")).toHaveClass('hovercardable');
|
||||
});
|
||||
|
||||
it("supports mentions without a given name", function() {
|
||||
this.statusMessage.set({text: "hey there @{alice@example.com} and @{bob@example.com}"});
|
||||
var formattedText = this.formatter(this.statusMessage.get("text"), this.statusMessage.get("mentioned_people"));
|
||||
var wrapper = $("<div>").html(formattedText);
|
||||
|
||||
_.each([this.alice, this.bob], function(person) {
|
||||
expect(wrapper.find("a[href='/people/" + person.guid + "']").text()).toContain(person.name);
|
||||
});
|
||||
});
|
||||
|
||||
it("it uses the name given in the mention if it exists", function() {
|
||||
this.statusMessage.set({text: "hey there @{Alice Awesome; alice@example.com} and @{bob@example.com}"});
|
||||
var formattedText = this.formatter(this.statusMessage.get("text"), this.statusMessage.get("mentioned_people"));
|
||||
var wrapper = $("<div>").html(formattedText);
|
||||
|
||||
expect(wrapper.find("a[href='/people/" + this.alice.guid + "']").text()).toContain("Alice Awesome");
|
||||
expect(wrapper.find("a[href='/people/" + this.bob.guid + "']").text()).toContain(this.bob.name);
|
||||
});
|
||||
});
|
||||
|
||||
context("highlight", function(){
|
||||
|
|
|
|||
Loading…
Reference in a new issue