Commit 44e49755adf9b7aeaa7d2068d9684244c31e8cf9
1 parent
2039747d
Exists in
master
and in
1 other branch
extract IssueTracker#configured? and NotificationService#configured?
App is not responsible to know implementation details of issue trackers and notification services.
Showing
3 changed files
with
10 additions
and
2 deletions
Show diff stats
app/models/app.rb
| ... | ... | @@ -142,11 +142,11 @@ class App |
| 142 | 142 | |
| 143 | 143 | |
| 144 | 144 | def issue_tracker_configured? |
| 145 | - !!(issue_tracker && issue_tracker.class < IssueTracker && issue_tracker.project_id.present?) | |
| 145 | + !!(issue_tracker && issue_tracker.class < IssueTracker && issue_tracker.configured?) | |
| 146 | 146 | end |
| 147 | 147 | |
| 148 | 148 | def notification_service_configured? |
| 149 | - !!(notification_service && notification_service.class < NotificationService && notification_service.api_token.present?) | |
| 149 | + !!(notification_service && notification_service.class < NotificationService && notification_service.configured?) | |
| 150 | 150 | end |
| 151 | 151 | |
| 152 | 152 | ... | ... |
app/models/issue_tracker.rb