Skip to content

Commit f4dba0f

Browse files
committed
fix problem where test may fail depending on the order the tests are being run in (random test seed)
1 parent d47eb7e commit f4dba0f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

test/unit/serializer/link_builder_test.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
class LinkBuilderTest < ActionDispatch::IntegrationTest
66
def setup
7+
# the route format is being set directly in test_helper and is being set differently depending on
8+
# the order in which the namespaces get loaded. in order to prevent random test seeds to fail we need to set the
9+
# default configuration in the test 'setup'.
10+
JSONAPI.configuration.route_format = :underscored_route
11+
712
@base_url = "http://example.com"
813
@route_formatter = JSONAPI.configuration.route_formatter
914
@steve = Person.create(name: "Steve Rogers", date_joined: "1941-03-01")

0 commit comments

Comments
 (0)