File tree Expand file tree Collapse file tree 4 files changed +27
-28
lines changed
slack-api-explorer/api/presenters Expand file tree Collapse file tree 4 files changed +27
-28
lines changed Original file line number Diff line number Diff line change 11### Changelog
22
3- ### 2/11/2016
4-
5- * Implemented an OOB GC - [ @dblock ] ( https://github.com/dblock ) .
6- * Swapped Puma for Unicorn - [ @dblock ] ( https://github.com/dblock ) .
7- * Fix: wait for the EventMachine reactor to start - [ @dblock ] ( https://github.com/dblock ) .
8-
9- ### 1/21/2016
10-
11- * Rebranded as Slack API Explorer - [ @dblock ] ( https://github.com/dblock ) .
12-
13- ### 1/15/2016
14-
15- * Fix: respond to @bot - [ @dblock ] ( https://github.com/dblock ) .
16-
17- ### 1/6/2016
18-
19- * [ #1 ] ( https://github.com/slack-ruby/slack-api-explorer/issues/1 ) : Added JSON processing - [ @dblock ] ( https://github.com/dblock ) .
20- * JSON output is now prettier - [ @dblock ] ( https://github.com/dblock ) .
21-
22- ### 1/5/2016
23-
24- * Initial public release - [ @dblock ] ( https://github.com/dblock ) .
3+ * 2023/01/16: Replaced Travis-CI with GHA - [ @dblock ] ( https://github.com/dblock ) .
4+ * 2018/05/10: Use ERB instead of static pages - [ @dblock ] ( https://github.com/dblock ) .
5+ * 2017/03/14: Use slack-ruby-bot-server - [ @dblock ] ( https://github.com/dblock ) .
6+ * 2016/02/11: Implemented an OOB GC - [ @dblock ] ( https://github.com/dblock ) .
7+ * 2016/02/11: Swapped Puma for Unicorn - [ @dblock ] ( https://github.com/dblock ) .
8+ * 2016/02/11: Fix: wait for the EventMachine reactor to start - [ @dblock ] ( https://github.com/dblock ) .
9+ * 2016/01/21: Rebranded as Slack API Explorer - [ @dblock ] ( https://github.com/dblock ) .
10+ * 2016/01/15: Fix: respond to @bot - [ @dblock ] ( https://github.com/dblock ) .
11+ * 2016/01/06: [ #1 ] ( https://github.com/slack-ruby/slack-api-explorer/issues/1 ) : Added JSON processing - [ @dblock ] ( https://github.com/dblock ) .
12+ * 2016/01/06: JSON output is now prettier - [ @dblock ] ( https://github.com/dblock ) .
13+ * 2016/01/05: Initial public release - [ @dblock ] ( https://github.com/dblock ) .
Original file line number Diff line number Diff line change 119119 addressable (~> 2.3 )
120120 mailchimp_api_v3 (0.2.18 )
121121 rest-client (~> 2 )
122- mime-types (3.2.2 )
122+ mime-types (3.4.1 )
123123 mime-types-data (~> 3.2015 )
124- mime-types-data (3.2019.0331 )
124+ mime-types-data (3.2022.0105 )
125125 mini_mime (1.0.1 )
126126 mini_portile2 (2.8.1 )
127127 minitest (5.11.3 )
243243 thread_safe (0.3.6 )
244244 timers (4.3.0 )
245245 to_regexp (0.2.1 )
246- tzinfo (1.2.5 )
246+ tzinfo (1.2.10 )
247247 thread_safe (~> 0.1 )
248248 uber (0.1.0 )
249249 unf (0.1.4 )
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ module StatusPresenter
1414 property :ping
1515
1616 def ping
17- team = Team . asc ( :_id ) . where ( api : true ) . first
17+ team = Team . active . asc ( :_id ) . where ( api : true ) . first
1818 return unless team
1919
2020 team . ping!
Original file line number Diff line number Diff line change 1313 expect ( status . teams_count ) . to eq 0
1414 end
1515
16- context 'with a team' do
17- let! ( :team ) { Fabricate ( :team , active : false ) }
16+ context 'with an active team' do
17+ let! ( :team ) { Fabricate ( :team , active : true ) }
1818 it 'returns a status with ping' do
1919 status = client . status
2020 expect ( status . teams_count ) . to eq 1
21+ expect ( status . active_teams_count ) . to eq 1
2122 ping = status . ping
2223 expect ( ping [ 'ok' ] ) . to eq 1
2324 end
2425 end
26+
27+ context 'with an inactive team' do
28+ let! ( :team ) { Fabricate ( :team , active : false ) }
29+ it 'returns no status' do
30+ status = client . status
31+ expect ( status . active_teams_count ) . to eq 0
32+ expect ( status . teams_count ) . to eq 1
33+ end
34+ end
2535 end
2636end
You can’t perform that action at this time.
0 commit comments