From 065859b90cc5ef403b8f47bd5394b343e556cc4d Mon Sep 17 00:00:00 2001 From: Azul Date: Wed, 23 Mar 2016 21:48:52 +0100 Subject: upgrade: remove references to RestClient CouchRest > 1.2 does not use RestClient anymore. So we should not try to catch its errors. --- engines/support/test/unit/ticket_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/support/test/unit/ticket_test.rb') diff --git a/engines/support/test/unit/ticket_test.rb b/engines/support/test/unit/ticket_test.rb index 7b5281f..c2c5e11 100644 --- a/engines/support/test/unit/ticket_test.rb +++ b/engines/support/test/unit/ticket_test.rb @@ -63,7 +63,7 @@ class TicketTest < ActiveSupport::TestCase test "find tickets user commented on" do # clear old tickets just in case - # this will cause RestClient::ResourceNotFound errors if there are multiple copies of the same ticket returned + # this will cause RESOURCE_NOT_FOUND errors if there are multiple copies of the same ticket returned Ticket.by_includes_post_by.key('123').each {|t| t.destroy} # TODO: the by_includes_post_by view is only used for tests. Maybe we should get rid of it and change the test to including ordering? -- cgit v1.2.3 From b851fe2fd6e0029df81976b647ede7190a1fd547 Mon Sep 17 00:00:00 2001 From: Azul Date: Sun, 22 May 2016 21:11:48 +0200 Subject: make ticket tests pass without network connection MX validations relied on network connection. Only using them in production environment now. I want to be able to develop and test when disconnected. --- engines/support/test/unit/ticket_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/support/test/unit/ticket_test.rb') diff --git a/engines/support/test/unit/ticket_test.rb b/engines/support/test/unit/ticket_test.rb index c2c5e11..373f06c 100644 --- a/engines/support/test/unit/ticket_test.rb +++ b/engines/support/test/unit/ticket_test.rb @@ -8,12 +8,12 @@ class TicketTest < ActiveSupport::TestCase test "ticket with default attribs is valid" do t = FactoryGirl.build :ticket - assert t.valid? + assert t.valid?, t.errors.full_messages.to_sentence end test "ticket without email is valid" do t = FactoryGirl.build :ticket, email: "" - assert t.valid? + assert t.valid?, t.errors.full_messages.to_sentence end test "ticket validates email format" do -- cgit v1.2.3