From 966dec6b5fefe8d82e3abc61cf7fca7f5812a69f Mon Sep 17 00:00:00 2001 From: Vasiliy Ermolovich Date: Sat, 14 Jul 2012 19:35:09 +0300 Subject: [PATCH] test that serialized attributes are casting to string --- spec/views/notices/_user_attributes.html.haml_spec.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+), 0 deletions(-) create mode 100644 spec/views/notices/_user_attributes.html.haml_spec.rb diff --git a/spec/views/notices/_user_attributes.html.haml_spec.rb b/spec/views/notices/_user_attributes.html.haml_spec.rb new file mode 100644 index 0000000..e094793 --- /dev/null +++ b/spec/views/notices/_user_attributes.html.haml_spec.rb @@ -0,0 +1,18 @@ +require 'spec_helper' + +describe "notices/_user_attributes.html.haml" do + describe 'autolink' do + let(:notice) do + user_attributes = { 'foo' => {'bar' => 'http://example.com'} } + Fabricate(:notice, :user_attributes => user_attributes) + end + + it "renders table with user attributes" do + assign :app, notice.err.app + + render "notices/user_attributes", :user => notice.user_attributes + rendered.should have_link('http://example.com') + end + end +end + -- libgit2 0.21.2