Sha256: 9d7b1382ae45b51a0a048bc78c30bcaff7cdda006a912c4fba826f198f5626bf
Contents?: true
Size: 705 Bytes
Versions: 2
Compression:
Stored size: 705 Bytes
Contents
require 'spec_helper' feature 'Product' do background { 1.upto(100) {|i| Product.create! :name => "product#{'%03d' % i}" } } subject { page } describe 'Index Page' do before { visit '/products' } it { should have_selector 'form.mighty-grid-filter' } it { should have_selector 'table.mighty-grid' } it { should have_selector 'ul.pagination' } end scenario 'filtering by fields' do visit '/products' product_name = Product.first.name within '.mighty-grid-filter' do fill_in "grid_f_name", :with => product_name end click_button "Apply changes" expect(page).to have_content product_name expect(page).to have_content '1 of 1' end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mighty_grid-0.3.2 | spec/requests/products_spec.rb |
mighty_grid-0.3.1 | spec/requests/products_spec.rb |