mirror of
https://github.com/kbparagua/paloma
synced 2023-03-27 23:21:17 -04:00
Test for calling another callback from a namespace
This commit is contained in:
parent
6b02d8b6fa
commit
e349d13562
3 changed files with 18 additions and 0 deletions
|
@ -70,4 +70,11 @@ feature 'Callbacks' do
|
|||
visit sample_namespace_categories_path
|
||||
page.has_selector?('#from-categories-index').should == true
|
||||
end
|
||||
|
||||
|
||||
it 'should execute sample_namespace/categories/index callback instead of new callback', :js => true do
|
||||
visit new_sample_namespace_category_path
|
||||
|
||||
page.has_selector?('#from-categories-index').should == true
|
||||
end
|
||||
end
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
=form_for @category do |f|
|
||||
=f.label :Name
|
||||
=f.text_field :name
|
||||
|
||||
=f.submit
|
|
@ -58,5 +58,11 @@ module SampleNamespace
|
|||
def index
|
||||
@categories = Category.all
|
||||
end
|
||||
|
||||
|
||||
def new
|
||||
@category = Category.new
|
||||
js_callback :index
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue