Skip to content

Commit

Permalink
adding more Plant tests
Browse files Browse the repository at this point in the history
  • Loading branch information
one-m1nd committed Mar 4, 2024
1 parent 897e483 commit 451f757
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions spec/models/plant_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,33 @@

it do
expect(subject).to be_instance_of(Hash)
expect(
a_request(:get, "https://trefle.io/api/v1/plants/search").with(query: { q: Plant.first.name })
).to have_been_made
end
end

describe '#family' do
subject { Plant.first.family }

it do
expect(subject).to be_instance_of(Family)
end
end

describe '#genus' do
subject { Plant.first.genus }

it do
expect(subject).to be_instance_of(Genus)
end
end

describe '#status' do
subject { Plant.first.status }

it do
expect(subject).to be_instance_of(Status)
end
end
end

0 comments on commit 451f757

Please sign in to comment.