diff --git a/test/functional/activities_controller_test.rb b/test/functional/activities_controller_test.rb index fc7494af92..644ee3086e 100644 --- a/test/functional/activities_controller_test.rb +++ b/test/functional/activities_controller_test.rb @@ -16,6 +16,7 @@ class ActivitiesControllerTest < ActionController::TestCase fixtures :all def test_project_index + Journal.delete_all project = Project.find(1) issue = FactoryGirl.create :issue, status_id: 2, diff --git a/test/integration/api_test/issues_test.rb b/test/integration/api_test/issues_test.rb index 7346fe4bfb..081f52e125 100644 --- a/test/integration/api_test/issues_test.rb +++ b/test/integration/api_test/issues_test.rb @@ -124,11 +124,11 @@ class ApiTest::IssuesTest < ActionDispatch::IntegrationTest FactoryGirl.create :work_package_journal, journable_id: 1, data: FactoryGirl.build(:journal_work_package_journal, - status_id: 1) - FactoryGirl.create :work_package_journal, - journable_id: 1, - data: FactoryGirl.build(:journal_work_package_journal, - status_id: 2) + status_id: 1) + @journal_to = FactoryGirl.create :work_package_journal, + journable_id: 1, + data: FactoryGirl.build(:journal_work_package_journal, + status_id: 2) end should "display journals" do @@ -140,7 +140,7 @@ class ApiTest::IssuesTest < ActionDispatch::IntegrationTest :attributes => { :type => 'array' }, :child => { :tag => 'journal', - :attributes => { :id => '2'}, + :attributes => { :id => @journal_to.id }, :child => { :tag => 'details', :attributes => { :type => 'array' },