Reload wps for journal access

[ci skip]
pull/6827/head
Oliver Günther 7 years ago
parent ea0fbe7ba8
commit f227afd24c
No known key found for this signature in database
GPG Key ID: 88872239EB414F99
  1. 8
      spec/lib/github_integration_spec.rb

@ -83,6 +83,8 @@ describe OpenProject::GithubIntegration do
journal_count = wps.map { |wp| wp.journals.count }
OpenProject::GithubIntegration::HookHandler.new.process('github', environment, params, user)
[wp1,wp2,wp3,wp4].map { |x| x.reload }
expect(wp1.journals.count).to equal(journal_count[0] + 1)
expect(wp2.journals.count).to equal(journal_count[1] + 1)
expect(wp3.journals.count).to equal(journal_count[2] + 0)
@ -126,6 +128,8 @@ describe OpenProject::GithubIntegration do
journal_count = wps.map { |wp| wp.journals.count }
OpenProject::GithubIntegration::HookHandler.new.process('github', environment, params, user)
[wp1,wp2,wp3,wp4].map { |x| x.reload }
expect(wp1.journals.count).to eq(journal_count[0] + 1)
expect(wp2.journals.count).to eq(journal_count[1] + 1)
expect(wp3.journals.count).to eq(journal_count[2] + 0)
@ -170,6 +174,8 @@ describe OpenProject::GithubIntegration do
journal_count = wps.map { |wp| wp.journals.count }
OpenProject::GithubIntegration::HookHandler.new.process('github', environment, params, user)
[wp1,wp2,wp3,wp4].map { |x| x.reload }
expect(wp1.journals.count).to equal(journal_count[0] + 1)
expect(wp2.journals.count).to equal(journal_count[1] + 1)
expect(wp3.journals.count).to equal(journal_count[2] + 0)
@ -217,6 +223,8 @@ describe OpenProject::GithubIntegration do
journal_count = wps.map { |wp| wp.journals.count }
OpenProject::GithubIntegration::HookHandler.new.process('github', environment, params, user)
[wp1,wp2,wp3,wp4].map { |x| x.reload }
expect(wp1.journals.count).to equal(journal_count[0] + 1)
expect(wp2.journals.count).to equal(journal_count[1] + 1)
expect(wp3.journals.count).to equal(journal_count[2] + 0)

Loading…
Cancel
Save