-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only issue statuses allowed in workflows of active trackers are shown. Fixes #121 Fixes #127 Fixes #130
- Loading branch information
Showing
4 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# frozen_string_literal: true | ||
|
||
require File.expand_path('../../spec_helper', __dir__) | ||
|
||
describe RdbDashboard do | ||
fixtures %i[ | ||
enabled_modules | ||
issue_statuses | ||
projects | ||
projects_trackers | ||
trackers | ||
workflows | ||
] | ||
|
||
subject(:dashboard) { RdbDashboard.new(project, options, params) } | ||
|
||
let(:project) { Project.find(1) } | ||
let(:options) { {} } | ||
let(:params) { {} } | ||
|
||
describe '#statuses' do | ||
subject(:statuses) { dashboard.statuses } | ||
|
||
before do | ||
# Delete all workflow rules related to status 6 (Rejected). We will test, | ||
# that this now unused issue status does not appear on the board. | ||
WorkflowTransition.where('new_status_id = :id OR old_status_id = :id', id: 6).delete_all | ||
end | ||
|
||
it 'returns the project' do | ||
expect(statuses.map(&:id)).to eq [1, 2, 3, 4, 5] | ||
end | ||
end | ||
end |