Fix some tests for changes in rails 5