diff options
author | Valery Sizov <vsv2711@gmail.com> | 2015-11-19 15:41:05 +0300 |
---|---|---|
committer | Valery Sizov <vsv2711@gmail.com> | 2015-11-19 15:41:05 +0300 |
commit | 671a49cfd53230b57acf579a609bab958e066982 (patch) | |
tree | c3fbd7d3cea07cc9c6e66961336d02ee09a70baa /spec/helpers | |
parent | 23c5473cc0bd9b9034c5671fbea1356b0fb531e5 (diff) |
added specs
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/issues_helper_spec.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/helpers/issues_helper_spec.rb b/spec/helpers/issues_helper_spec.rb index 78a6b631eb2..1f2c4ee77b5 100644 --- a/spec/helpers/issues_helper_spec.rb +++ b/spec/helpers/issues_helper_spec.rb @@ -127,4 +127,30 @@ describe IssuesHelper do it { is_expected.to eq("!1, !2, or !3") } end + describe "#url_to_emoji" do + it "returns url" do + expect(url_to_emoji("smile")).to include("emoji/1F604.png") + end + end + + describe "#emoji_list" do + it "returns url" do + expect(emoji_list).to be_kind_of(Array) + end + end + + describe "#note_active_class" do + before do + @note = create :note + @note1 = create :note + end + + it "returns empty string for unauthenticated user" do + expect(note_active_class(Note.all, nil)).to eq("") + end + + it "returns active string for author" do + expect(note_active_class(Note.all, @note.author)).to eq("active") + end + end end |