Sha256: c5bfc05495d3fab4b76626a3f248aecb10da60ea355712e30237566c057d8ee1
Contents?: true
Size: 993 Bytes
Versions: 11
Compression:
Stored size: 993 Bytes
Contents
require File.dirname(__FILE__) + '/../test_helper' class Muck::CartsControllerTest < ActionController::TestCase tests Muck::CartsController context "GET show" do context "not logged in - empty cart" do setup do get :show end should_not_set_the_flash should_respond_with :success should_render_template :show end context "not logged in - nonempty cart" do setup do @cart = Factory(:cart) @request.cookies[:cart_token] = @cart.token get :show end should_not_set_the_flash should_respond_with :success should_render_template :show end context "logged in as owner" do setup do @user = Factory(:user) @cart = Factory(:cart, :cartable => @user) login_as @user get :show, :user_id => @user.login end should_not_set_the_flash should_respond_with :success should_render_template :show end end end
Version data entries
11 entries across 11 versions & 1 rubygems