1
0
Fork 0
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:
kbparagua 2013-01-19 10:27:51 +08:00
parent 6b02d8b6fa
commit e349d13562
3 changed files with 18 additions and 0 deletions

View file

@ -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

View file

@ -0,0 +1,5 @@
=form_for @category do |f|
=f.label :Name
=f.text_field :name
=f.submit

View file

@ -58,5 +58,11 @@ module SampleNamespace
def index
@categories = Category.all
end
def new
@category = Category.new
js_callback :index
end
end
end