spec/zertico/controller_spec.rb in zertico-0.6.0 vs spec/zertico/controller_spec.rb in zertico-0.6.1

- old
+ new

@@ -1,9 +1,22 @@ require 'spec_helper' describe Zertico::Controller do let(:controller) { Zertico::Controller.new } let(:user_controller) { UserController.new } + let(:admin_controller) { Admin::UserController.new } + + context 'not being nested' do + it 'should find on the correct id' do + user_controller.send(:interface_id).should == 'id' + end + end + + context 'being nested' do + it 'should find on the correct id' do + admin_controller.send(:interface_id).should == 'user_id' + end + end context 'without a custom service' do it 'should extend Zertico::Service' do controller.should respond_to :all end \ No newline at end of file