Commit b43b500dbe80ba6ecb1d4d03b4d8ce12ae8ef7db

Authored by Vasiliy Ermolovich
2 parents 6390f13e 8b5159ec
Exists in master and in 1 other branch production

Merge branch 'fix_user_value_bug'

app/views/notices/_user_attributes.html.haml
... ... @@ -6,4 +6,4 @@
6 6 - user.each do |user_key, user_value|
7 7 %tr
8 8 %th= user_key
9   - %td= auto_link(user_value).html_safe
  9 + %td= auto_link(user_value.to_s).html_safe
... ...
spec/views/notices/_user_attributes.html.haml_spec.rb 0 → 100644
... ... @@ -0,0 +1,18 @@
  1 +require 'spec_helper'
  2 +
  3 +describe "notices/_user_attributes.html.haml" do
  4 + describe 'autolink' do
  5 + let(:notice) do
  6 + user_attributes = { 'foo' => {'bar' => 'http://example.com'} }
  7 + Fabricate(:notice, :user_attributes => user_attributes)
  8 + end
  9 +
  10 + it "renders table with user attributes" do
  11 + assign :app, notice.err.app
  12 +
  13 + render "notices/user_attributes", :user => notice.user_attributes
  14 + rendered.should have_link('http://example.com')
  15 + end
  16 + end
  17 +end
  18 +
... ...