spec/rails/spec/requests/faml_spec.rb in faml-0.4.2 vs spec/rails/spec/requests/faml_spec.rb in faml-0.5.0
- old
+ new
@@ -43,9 +43,23 @@
get '/books/escaped'
expect(response).to be_ok
expect(response.body).to include('<marquee>escape me</marquee>')
end
+ describe 'object reference' do
+ it 'works with new object' do
+ get '/books/object_ref'
+ expect(response).to be_ok
+ expect(response.body).to include("<div class='book' id='book_new'>")
+ end
+
+ it 'works with id' do
+ get '/books/object_ref', id: 123
+ expect(response).to be_ok
+ expect(response.body).to include("<div class='book' id='book_123'>")
+ end
+ end
+
describe 'preserve helper' do
it 'returns html_safe string' do
get '/books/preserve'
expect(response).to be_ok
expect(response.body).to include('<b>preserve
me</b>')