File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed
Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ Metrics/BlockLength:
99 - ' config/routes.rb'
1010 - ' app/models/gui_user.rb'
1111 - ' app/models/unit.rb'
12+ - ' config/initializers/rails_admin.rb'
1213
1314Metrics/CyclomaticComplexity :
1415 Exclude :
Original file line number Diff line number Diff line change 1111 @current_gui_user ||= GUIUser . find_by ( id : session [ :user_id ] ) if session [ :user_id ]
1212 end
1313
14+ config . actions do
15+ dashboard # mandatory
16+ index # mandatory
17+ new
18+ export
19+ show
20+ edit
21+ show_in_app
22+
23+ delete do
24+ visible do
25+ bindings [ :abstract_model ] . model == Unit
26+ end
27+ end
28+
29+ ## With an audit adapter, you can add:
30+ # history_index
31+ # history_show
32+ end
33+
1434 config . navigation_static_label = 'Tools'
1535 config . navigation_static_links = {
1636 'Sidekiq' => '/sidekiq'
Original file line number Diff line number Diff line change 5050 expect ( response . body ) . to include ( '123' )
5151 expect ( response . body ) . to include ( '45678' )
5252 expect ( response . body ) . to include ( unit . total_pages_processed . to_s )
53+ expect ( response . body ) . to include ( 'Delete' )
5354 end
5455
5556 it 'shows GuiUser list and show content' do
6263 expect ( response . body ) . to include ( 'gui.user@example.com' )
6364 expect ( response . body ) . to include ( 'Accessibility Services Unit' )
6465 expect ( response . body ) . to include ( gui_user_record . total_pages_processed_last_24_hours . to_s )
66+ expect ( response . body ) . not_to include ( 'Delete' )
6567 end
6668
6769 it 'shows ApiUser list and show content including' do
7779 expect ( response . body ) . to include ( 'https://example.com/webhook' )
7880 expect ( response . body ) . to include ( 'Accessibility Services Unit' )
7981 expect ( response . body ) . to include ( api_user_record . total_pages_processed_last_24_hours . to_s )
82+ expect ( response . body ) . not_to include ( 'Delete' )
8083 end
8184
8285 it 'shows Job list and show content' do
You can’t perform that action at this time.
0 commit comments