From 0da90ec8f8cf8e4fef856ecc061c9838f963d4f3 Mon Sep 17 00:00:00 2001 From: Sebastian Schuster Date: Fri, 26 Apr 2013 16:13:10 +0200 Subject: [PATCH] Added extra steps for checkin + button existence for impediments --- spec/views/rb_taskboards/show_spec.rb | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/spec/views/rb_taskboards/show_spec.rb b/spec/views/rb_taskboards/show_spec.rb index 039af7e763..294c38576e 100644 --- a/spec/views/rb_taskboards/show_spec.rb +++ b/spec/views/rb_taskboards/show_spec.rb @@ -108,5 +108,31 @@ describe 'rb_taskboards/show' do end end end + + it 'renders clickable + buttons for impediments with the right permissions' do + User.current = user1 + + render + + stories.each do |story| + assert_select '#impediments td.add_new' do |td| + td.should have_content '+' + td.should have_css '.clickable' + end + end + end + + it 'does not render a clickable + buttons for impediments without the right permissions' do + User.current = user2 + + render + + stories.each do |story| + assert_select '#impediments td.add_new' do |td| + td.should_not have_content '+' + td.should_not have_css '.clickable' + end + end + end end end