Sha256: 72f2435a87d583ab2fb0ae82ae51dd0676ae00f9dbaa60e7cc81288c7c1f2830

Contents?: true

Size: 650 Bytes

Versions: 6

Compression:

Stored size: 650 Bytes

Contents

require 'test_helper'

describe 'show apples' do
  include AcceptanceHelper

  describe 'attributes' do
    let(:apple) { Apple.create(name: 'Granny Smith') }

    before do
      admin_page "/apples/#{apple.id}"
    end

    it 'should show proper header values' do
      table_headers = page.all('table tbody tr th').map(&:text)

      assert_includes table_headers, 'ID'
      assert_includes table_headers, 'Name'
    end

    it 'should show proper table values' do
      table_values = page.all('table tbody tr td').map(&:text)

      assert_includes table_values, apple.id.to_s
      assert_includes table_values, apple.name
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ceo-0.2.0 test/ceo/show_apple_test.rb
ceo-0.1.7 test/ceo/show_apple_test.rb
ceo-0.1.6 test/ceo/show_apple_test.rb
ceo-0.1.5 test/ceo/show_apple_test.rb
ceo-0.1.4 test/ceo/show_apple_test.rb
ceo-0.1.3 test/ceo/show_apple_test.rb