spec/unit/config/actions_spec.rb in obitum-rails_admin-0.0.2 vs spec/unit/config/actions_spec.rb in obitum-rails_admin-0.0.3
- old
+ new
@@ -25,9 +25,13 @@
RailsAdmin::Config::Actions.find(:custom_dashboard).should be_a(RailsAdmin::Config::Actions::Dashboard)
RailsAdmin::Config::Actions.find(:custom_collection).should be_a(RailsAdmin::Config::Actions::Index)
RailsAdmin::Config::Actions.find(:show).should be_a(RailsAdmin::Config::Actions::Show)
end
+ it 'should return nil when no action is found by the custom key' do
+ RailsAdmin::Config::Actions.find(:non_existent_action_key).should be_nil
+ end
+
it 'should return visible action passing binding if controller binding is given, and pass action visible or not if no' do
RailsAdmin.config do |config|
config.actions do
root :custom_root do
visible do