spec/controllers/refinery/admin/users_controller_spec.rb in refinerycms-authentication-2.0.3 vs spec/controllers/refinery/admin/users_controller_spec.rb in refinerycms-authentication-2.0.4

- old
+ new

@@ -8,12 +8,14 @@ Refinery::Role.should_receive(:all).once{ [] } get :new end it "loads plugins" do + user_plugin = Refinery::Plugins.registered.detect { |plugin| plugin.name == "refinery_users" } plugins = Refinery::Plugins.new - plugins.should_receive(:in_menu).once{ [] } + plugins << user_plugin + plugins.should_receive(:in_menu).once{ [user_plugin] } Refinery::Plugins.should_receive(:registered).at_least(1).times{ plugins } get :new end end @@ -49,10 +51,10 @@ end end describe "#edit" do it "renders the edit template" do - get :edit, :id => "1" + get :edit, :id => refinery_superuser.id response.should be_success response.should render_template("refinery/admin/users/edit") end it_should_behave_like "new, create, update, edit and update actions"