Sha256: 20e60d6c8938cb0a5b00fb6e915a539101ddf46b008923ab10489a5e5b7cc0fb
Contents?: true
Size: 814 Bytes
Versions: 35
Compression:
Stored size: 814 Bytes
Contents
require 'spec_helper' describe Iugu::AccountRolesController do context "edit" do login_as_user context "when current_user owns the account" do before(:each) do @current_account_user = @user.account_users.first @current_account_user.set_roles(["owner"]) get :edit, :id => @current_account_user.account, :user_id => @current_account_user.user end it { response.should render_template "iugu/account_roles/edit" } it { response.should be_success } end end context "update" do login_as_user before(:each) do @account_id = @user.account_users.first.account post :update, :id => @account_id, :user_id => @user, :roles => [] end it { response.should redirect_to account_users_index_path(@account_id)} end end
Version data entries
35 entries across 35 versions & 1 rubygems