python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Testing unprocessable_entity in standard rails framework
With the goal of getting coverage for a line that,
if the object cannot be saved
render :new, status: :unprocessable_entity
writing a test, for a class where Post belongs_to :user, such as
assert_...
Jerome
Votes: 0
Answers: 0
rails minitest assertions failing when contorller logging indicates success
this test runs a methods that nullifies an input (discount) in case two are provided.
patch promotion_url(promotions(:valid)), params: { promotion: { discount_percentage: 20, discount: 9.99 } }
assert...
Jerome
Votes: 0
Answers: 0
How to fix this sort_by in collection_select works in the browser but returns "comparison of String with nil failed" error in Capybara
I've been stuck on trying to write a system test for a form that manually works in the browser.
I have a Speaker model that has_one :individual. The form field looks like this:
<fieldset>
<...

Lee McAlilly
Votes: 0
Answers: 1