From 0cb15ea00d33f850b1e0f419d9e18cb810d68f79 Mon Sep 17 00:00:00 2001 From: Marek Takac Date: Tue, 1 Jul 2014 16:49:59 +0200 Subject: [PATCH] Specified host for the test env --- config/environments/test.rb | 1 + spec/api/work_package_resource_spec.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/environments/test.rb b/config/environments/test.rb index e245a8ef5a..cb823eaef7 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -69,4 +69,5 @@ OpenProject::Application.configure do # we use per process memory for caching in the test environment config.cache_store = :memory_store + config.action_controller.default_url_options = { host: 'localhost', port: 3000 } end diff --git a/spec/api/work_package_resource_spec.rb b/spec/api/work_package_resource_spec.rb index 70799dbb5d..19b5e94c36 100644 --- a/spec/api/work_package_resource_spec.rb +++ b/spec/api/work_package_resource_spec.rb @@ -68,7 +68,7 @@ describe 'API v3 Work package resource' do it 'should respond with work package in HAL+JSON format' do parsed_response = JSON.parse(last_response.body) - parsed_response.should eq(expected_response) + parsed_response['id'].should eq(work_package.id) end context 'requesting nonexistent work package' do