Respects existence of other generated data

pull/312/head
Hagen Schink 11 years ago committed by Martin Czuchra
parent 0fd3c645db
commit 71d6c0d12c
  1. 1
      test/functional/activities_controller_test.rb
  2. 12
      test/integration/api_test/issues_test.rb

@ -16,6 +16,7 @@ class ActivitiesControllerTest < ActionController::TestCase
fixtures :all fixtures :all
def test_project_index def test_project_index
Journal.delete_all
project = Project.find(1) project = Project.find(1)
issue = FactoryGirl.create :issue, issue = FactoryGirl.create :issue,
status_id: 2, status_id: 2,

@ -124,11 +124,11 @@ class ApiTest::IssuesTest < ActionDispatch::IntegrationTest
FactoryGirl.create :work_package_journal, FactoryGirl.create :work_package_journal,
journable_id: 1, journable_id: 1,
data: FactoryGirl.build(:journal_work_package_journal, data: FactoryGirl.build(:journal_work_package_journal,
status_id: 1) status_id: 1)
FactoryGirl.create :work_package_journal, @journal_to = FactoryGirl.create :work_package_journal,
journable_id: 1, journable_id: 1,
data: FactoryGirl.build(:journal_work_package_journal, data: FactoryGirl.build(:journal_work_package_journal,
status_id: 2) status_id: 2)
end end
should "display journals" do should "display journals" do
@ -140,7 +140,7 @@ class ApiTest::IssuesTest < ActionDispatch::IntegrationTest
:attributes => { :type => 'array' }, :attributes => { :type => 'array' },
:child => { :child => {
:tag => 'journal', :tag => 'journal',
:attributes => { :id => '2'}, :attributes => { :id => @journal_to.id },
:child => { :child => {
:tag => 'details', :tag => 'details',
:attributes => { :type => 'array' }, :attributes => { :type => 'array' },

Loading…
Cancel
Save