mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-10-31 11:21:06 -04:00
18 lines
380 B
Ruby
18 lines
380 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'rails_helper'
|
|
|
|
describe "crops/hierarchy" do
|
|
before do
|
|
controller.stub(:current_user) { nil }
|
|
@tomato = create(:tomato)
|
|
@roma = create(:crop, name: 'Roma tomato', parent: @tomato)
|
|
assign(:crops, [@tomato, @roma])
|
|
render
|
|
end
|
|
|
|
it "shows crop hierarchy" do
|
|
assert_select "ul>li>ul>li", text: @roma.name
|
|
end
|
|
end
|