diff options
| author | mo khan <mo@mokhan.ca> | 2014-10-18 19:16:37 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-10-18 19:16:37 -0600 |
| commit | 6a07f43e2f8b2ff287ee70bccf879219b5b09cd8 (patch) | |
| tree | 8895176ddc364cf35784f92830b369cadadd1d86 /spec/controllers | |
| parent | d11af17e3cbc3622fae5f7cec5c31a2f44ebdf41 (diff) | |
route categories to the cakes controller and remove old categories controller.
Diffstat (limited to 'spec/controllers')
| -rw-r--r-- | spec/controllers/categories_controller_spec.rb | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/spec/controllers/categories_controller_spec.rb b/spec/controllers/categories_controller_spec.rb deleted file mode 100644 index 67b5d041..00000000 --- a/spec/controllers/categories_controller_spec.rb +++ /dev/null @@ -1,36 +0,0 @@ -require 'rails_helper' - -describe CategoriesController do - let(:creation) { create(:creation) } - let(:category) { create(:category, :creations => [creation]) } - - describe "GET show" do - context "when there is a category that matches the slug" do - context "when there are creations in the category" do - before { get :show, id: category.slug } - - it "should return the creations in the category" do - assigns(:creations).should include(creation) - end - - it "should return the category" do - assigns(:category).should == category - end - end - - context "when there are no creations in the category" do - let(:other_category) { create(:category, slug: 'booooo') } - - before { get :show, id: other_category.to_param } - - it "should return zero creations" do - assigns(:creations).should be_empty - end - - it "should return the category" do - assigns(:category).should eq(other_category) - end - end - end - end -end |
