view · edit · sidebar · attach · print · history




  • port sbsm/ to use the rack webserver and test it
  • Keep in Mind



port sbsm/ to use the rack webserver and test it

Must rework tests like test/feature/kontakt_test.rb to use the test-rack. Started with makeing the following snippet pass

  def test_root
    get '/'
    assert last_response.ok?
    assert_match 'Fachpsychologin für Psychotherapie', last_response.body

Using nokogiri to test page elements. Rewrote home_test.rb and dissertation_test.rb. Same for person and schwerpunkte. Now must test the only page which contains a POST element. The existing test does not contain any step to really test a submit.

The unit tests shows clearly, that the POST method does not work (it displays only the home page). Debugging the problem with pry.

Did sending E-Mail ever work for Steinwies? Yes. Handling the POST events fails in method test_user_input_hash of test/test_session.rb. I must fix this problem now. Fixed the unit tests in sbsm and applied some fixed in sbsm/lib to make them pass.

Now looking a to analyse how the post works there. Using the HTTPFox I see that I get a POST for en/page with cookies sbsm-persistent-cookes language%3Den (it is flickering in my)

where on I have no cookies, no query string and POST data {'email' => 'some@user', 'anrede', ''}. Its raw data look like

Aftewards the en/page is loaded. But is an e-mail sent now?

The page for the confirm dialog displayed on looks like this.

It looks as I am too stupid to understand how mod_ruby and sbsm interacted when handling a POST request. How can I figure this out? Should I try to use the pry with the master branch of Will continue tomorrow.

Pushed commit Made all unittests pass

Not yet pushing commits for as I have problems cleaning up the thread after each test.

view · edit · sidebar · attach · print · history
Page last modified on October 18, 2016, at 07:06 PM