The following tests failed:
Looking again at the unit tests and their failures, as the hand made tests show only one failure. Creating a config.ru for tests like in steinwies.ch.
Also converting send_mail to use the same Mail class as in steinwies.ch. ALso I found no test for sending mails.
Pushed the following commits:
Now I have as test result 8 runs, 25 assertions, 3 failures, 4 errors, 0 skips
and must work on making them pass.
Looking at the test/feature/articles_test.rb
I found that it fails when trying to follow the link of the article, which is a javascript. It fails, because I am running in the test the real db_manager and not the support/stub/db_manager. This has to be corrected. The easiest is probably by moving this definition to the config.yml, too. TFixed this problem, but I still have problems following the links which use javascripts. Are they not corrrectly served while running tests? Okay the problem is, that I do not have dojo installed in the git checkout. Added a test in test_helper to make all tests fail very eary when dojo is not installed. Updated test_helper to download dojo if it is missing. This should make the tests run on travis-ci, too.
Pushed commit Made unit tests work. Install dojo if missing
But tests work only when running under chromedriver. Not with phantomjs.
Now must add a test to see whether sending an e-mail works or not. Found first some other tests to be completed in test_shop.rb. Two small helper method made them work and one shows that clicking on Title of article does not work. Verified on davaz.ngiger.ch, where visiting http://davaz.ngiger.ch/en/communication/shop_art_object/artgroup_id/PUB/artobject_id/1048 produced NoMethodError undefined method `artobject_id' for nil:NilClass
I think I will change to_html in sbsm/session.rb not to catch the standard error, to see the nice webrick backtrace.
Discovered that http://davaz.com/en/communication/shop_art_object/artgroup_id/PUB/artobject_id/1048 has also a problem and is displayin NoMethodError undefined method `artobject_id' for nil:NilClass
. Therefore I must fix a problem in davaz.com.
Suddenly I don't get any real output when running the test rake for davaz.com. Why? A reboot fixed this problem. Don't know why.
Pushed commit to sbsm Let webrick handle the exception and display a nice callback
Pushed commits:
Todo for next week: