Sha256: 47de1a11a5879a90333372910e5fb1665c37f44508d2682ea76e8f5c8b063ff8
Contents?: true
Size: 1.43 KB
Versions: 33
Compression:
Stored size: 1.43 KB
Contents
require 'spec_helper' describe Admin::AccountsController, "routes" do it { should route(:get, "/admin/accounts").to(:action => :index) } it { should route(:get, "/admin/accounts/123").to(:action => :show, :id => 123) } end describe Admin::AccountsController, "get index without http auth" do before { get :index } it { should respond_with(:unauthorized) } end describe Admin::AccountsController, "get index with http auth" do before do http_basic_auth_sign_in 'admin', 'admin' get :index end it { should respond_with(:success) } it { should render_template(:index) } end describe Admin::AccountsController, "get search without http auth" do before { get :search } it { should respond_with(:unauthorized) } end describe Admin::AccountsController, "get search with http auth" do before do http_basic_auth_sign_in 'admin', 'admin' get :search end it { should respond_with(:success) } it { should render_template(:index) } end describe Admin::AccountsController, "get show without http auth" do let(:account) { Factory(:account) } before { get :show, :id => account.to_param } it { should respond_with(:unauthorized) } end describe Admin::AccountsController, "get show with http auth" do let(:account) { Factory(:account) } before do http_basic_auth_sign_in 'admin', 'admin' get :show, :id => account.to_param end it { should respond_with(:success) } it { should render_template(:show) } end
Version data entries
33 entries across 33 versions & 1 rubygems