Commit graph

18 commits

Author SHA1 Message Date
Tom Hughes
71c2fc671f Cleanup double comment markers 2017-02-05 17:25:54 +00:00
Andy Allan
62346c7e88 Be explicit in which traces are expected.
I think this is an improvement compared to running db queries to
fetch the expected results.
2016-11-17 10:26:54 +00:00
Andy Allan
717f4e1b7b Create object for list tests, and assert the responses have the
required number of results.

Previously, the tests would pass regardless of whether anything was
in the database.
2016-11-16 20:08:16 +00:00
Andy Allan
a66f0f32e9 Rename test trace fixtures to use letters instead of numbers.
This prevents them from being deleted by mistake, if trace.delete is
called on a factory-generated trace with a coincidental id.
2016-11-16 17:45:26 +00:00
Andy Allan
d80dee4989 Move instance creation to the top of the test methods. 2016-11-01 10:43:38 +00:00
Andy Allan
a32333ba12 Use stub_any_instance in order to stub find results.
This is a much cleaner approach than before.
2016-10-30 10:22:10 +01:00
Andy Allan
15689af6bf Replace trace-related fixtures with factories.
The mocking and stubbing in the controller tests is
unfortunate, but the models interact directly with the filesystem
using the trace id so that's hard to control any other way.
2016-10-29 16:23:04 +02:00
Andy Allan
72ae20ea3c Replace user_preferences fixture with a factory. 2016-10-26 10:07:49 +01:00
Tom Hughes
f94340b9e8 Fix tests that made assumptions about tag ordering 2016-03-09 13:47:05 +00:00
Tom Hughes
1891efef06 Testing, testing, testing... 2015-03-01 23:05:32 +00:00
Tom Hughes
e07d225568 Fix rubocop warnings 2015-03-01 17:23:17 +00:00
Tom Hughes
fd588cd715 The test train rolls ever onwards... 2015-03-01 17:04:39 +00:00
Tom Hughes
dc2a2c8ebd Standardise on double quoted strings 2015-02-20 19:47:26 +00:00
Tom Hughes
ef7f3d800c Fix most auto-correctable rubocop issues 2015-02-20 08:56:16 +00:00
Tom Hughes
34e3e51456 Cleanup trailing whitespace 2015-02-20 08:56:16 +00:00
Tom Hughes
28bfb9999f Rename Trace#public to Trace#visible_to_all 2014-07-04 19:24:25 +01:00
Tom Hughes
1a38e9b315 Don't pass strings to set_fixture_class 2014-04-27 19:16:42 +01:00
Tom Hughes
98184dfb9c Reorganise tests to match modern rails test layout 2014-02-26 00:13:19 +00:00
Renamed from test/functional/trace_controller_test.rb (Browse further)