-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Host can make offer on listing #15
base: development
Are you sure you want to change the base?
Host can make offer on listing #15
Conversation
…to listing, 1/8 tests going green
…ontroller. Tests still red.
…e of columns in Offer model, adds show method to offers controller
…ew method show in listing-controller
…curate ones, removes empty lines. First test in scenario going green, 1/10
…tep definitions. Happy path all green
…essage saying you need to fill in all fields correctly
…relevant step definition, deletes background steps in feature
app/controllers/offers_controller.rb
Outdated
end | ||
|
||
def new | ||
@offer = Offer.new(offer_params) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you need to use an instance variable here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no
end | ||
|
||
def create | ||
@listing = Listing.find(params[:listing_id]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you need to use an instance variable here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didnt work without
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What did you try?
|
||
def create | ||
@listing = Listing.find(params[:listing_id]) | ||
@offer = @listing.offers.create(offer_params) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you need to use an instance variable here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didnt work without
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please explain what is the other option you tried @Carrosen
When I visit the landing page | ||
|
||
Scenario: Host can successfully create an offer | ||
Then I should see "Zane" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary to test for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Then I should see "Zane" | ||
When I click "Make an offer" within "Zane" section | ||
Then I should be on the "Zane" listing page | ||
Then I should see "Create your offer" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
When I click "Make an offer" within "Zane" section | ||
Then I should be on the "Zane" listing page | ||
Then I should see "Create your offer" | ||
And I fill in "Name" with "Steffe" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Then I should be on landing page | ||
|
||
Scenario: Host can not create an offer when not all the fields are filled in. | ||
When I click "Make an offer" within "Zane" section |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comments as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
…, all 113 test going green
PT Story
Changes proposed in this pull request:
What we have learned working on this feature:
Screenshots