Skip to content

Commit

Permalink
Expand specs to include a simple string filter
Browse files Browse the repository at this point in the history
  • Loading branch information
elia committed Aug 8, 2013
1 parent cae5b22 commit c77619c
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions spec/features/smoke_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
# New
click_on 'Posts'
click_on 'New Post'

fill_in 'Title', with: 'dhh screencast'
fill_in 'Body', with: 'is still the best intro to rails'

Expand All @@ -49,12 +48,26 @@

# List
within('.breadcrumb') { click_on 'Posts' }

within '#index_table_posts' do
page.should have_content('DHH original screencast')
page.should have_content('is still the best intro to rails')
end

# Filter
fill_in 'Search Title', with: 'original'
click_on 'Filter'

within '#index_table_posts' do
page.should have_content('DHH original screencast')
end

fill_in 'Search Title', with: 'orizinal'
click_on 'Filter'
page.should_not have_content('DHH original screencast')

fill_in 'Search Title', with: ''
click_on 'Filter'

page.should have_content('Displaying 1 Post')
end
end

0 comments on commit c77619c

Please sign in to comment.