mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-10-31 11:21:06 -04:00
22 lines
545 B
Ruby
22 lines
545 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'rails_helper'
|
|
|
|
describe "crops/_popover" do
|
|
before do
|
|
@tomato = create(:tomato)
|
|
@sn = create(:solanum_lycopersicum, crop: @tomato)
|
|
@planting = create(:planting, crop: @tomato)
|
|
@tomato.reload # to pick up latest plantings_count
|
|
render partial: 'crops/popover', locals: { crop: @tomato }
|
|
end
|
|
|
|
it 'has a scientific name' do
|
|
expect(rendered).to have_content 'Solanum lycopersicum'
|
|
end
|
|
|
|
it 'shows count of plantings' do
|
|
expect(rendered).to have_content '1 time'
|
|
end
|
|
end
|