1
0
Fork 0
mirror of https://github.com/kbparagua/paloma synced 2023-03-27 23:21:17 -04:00

Adjust advanced spec

This commit is contained in:
kbparagua 2015-03-24 22:01:18 +08:00
parent 81e873dfd5
commit b37391d1a7

View file

@ -13,10 +13,11 @@ feature 'executing Paloma controller', :js => true do
it 'executes the same namespace/controller/action' do it 'executes the same namespace/controller/action' do
visit admin_foos_path visit admin_foos_path
expect(request).to eq({ expect(
'controller' => 'Admin/Foos', request['controller'] == 'Admin/Foos' &&
'action' => 'index', request['action'] == 'index' &&
'params' => {}}) request['params'] == {}
).to be_truthy
end end
end end
@ -25,10 +26,11 @@ feature 'executing Paloma controller', :js => true do
it 'executes the specified controller' do it 'executes the specified controller' do
visit admin_foo_path(1) visit admin_foo_path(1)
expect(request).to eq({ expect(
'controller' => 'NotAdmin/Foos', request['controller'] == 'NotAdmin/Foos' &&
'action' => 'show', request['action'] == 'show' &&
'params' => {'x' => 99}}) request['params'] == {'x' => 99}
).to be_truthy
end end
end end
@ -37,10 +39,11 @@ feature 'executing Paloma controller', :js => true do
it 'executes the specified action' do it 'executes the specified action' do
visit new_admin_foo_path visit new_admin_foo_path
expect(request).to eq({ expect(
'controller' => 'Admin/Foos', request['controller'] == 'Admin/Foos' &&
'action' => 'otherAction', request['action'] == 'otherAction' &&
'params' => {'x' => 99}}) request['params'] == {'x' => 99}
).to be_truthy
end end
end end
@ -49,12 +52,13 @@ feature 'executing Paloma controller', :js => true do
it 'executes the specified controller/action' do it 'executes the specified controller/action' do
visit edit_admin_foo_path(1) visit edit_admin_foo_path(1)
expect(request).to eq({ expect(
'controller' => 'NotAdmin/Foos', request['controller'] == 'NotAdmin/Foos' &&
'action' => 'otherAction', request['action'] == 'otherAction' &&
'params' => {'x' => 99}}) request['params'] == {'x' => 99}
).to be_truthy
end end
end end
end end