README.md in leap_salesforce-0.1.15 vs README.md in leap_salesforce-0.1.16
- old
+ new
@@ -178,11 +178,11 @@
Representation of the details for created an entity can be handled much neater by `FactoryBot`.
If we had the following `factory` for Contact
```ruby
FactoryBot.define do
factory :contact do
- first_name { 'Test Person' }
+ last_name { 'Test Person' }
end
end
```
then we could perform the same creation of a contact with simply
@@ -201,10 +201,15 @@
@contact = Contact.create
```
##### Reading entities
+To retrieve an entity, the `find` method can be called on the class for the object required. For example
+to obtain an object representing a contact with a last name of 'Test Person' we could do:
+```ruby
+@contact = Contact.find last_name: 'Test Person'
+```
## Structure
Following is the general structure of test automation suite that uses this approach. Details may vary depending on the
test framework used and other preferences.
\ No newline at end of file