A platform for community discussion. Free, open, simple.
correct specs
Samb26e27bdab72
diff --git a/spec/controllers/list_controller_spec.rb b/spec/controllers/list_controller_spec.rbindex 7a04838d817..1f1374c5c92 100644--- a/spec/controllers/list_controller_spec.rb+++ b/spec/controllers/list_controller_spec.rb@@ -7,8 +7,7 @@ describe ListController do@user = Fabricate(:coding_horror)@post = Fabricate(:post, user: @user)- # forces tests down some code paths- SiteSetting.top_menu = 'latest,-video|new|unread|categories|category/beer'+ SiteSetting.top_menu = 'latest|new|unread|categories'enddescribe 'indexes' dodiff --git a/spec/models/top_menu_item_spec.rb b/spec/models/top_menu_item_spec.rbindex 61f78e08490..2027edbf3a9 100644--- a/spec/models/top_menu_item_spec.rb+++ b/spec/models/top_menu_item_spec.rb@@ -2,39 +2,14 @@ require 'rails_helper'describe TopMenuItem dobefore do- SiteSetting.top_menu = 'one,-nope|two|three,-not|four,ignored|latest|category/xyz'+ SiteSetting.top_menu = 'categories|latest'endlet(:items) { SiteSetting.top_menu_items }it 'has name' do- expect(items[0].name).to eq('one')- expect(items[1].name).to eq('two')- expect(items[2].name).to eq('three')- end-- it 'has a filter' do- expect(items[0].filter).to eq('nope')- expect(items[0].has_filter?).to be_truthy- expect(items[2].filter).to eq('not')- expect(items[2].has_filter?).to be_truthy- end-- it 'does not have a filter' do- expect(items[1].filter).to be_nil- expect(items[1].has_filter?).to be_falsey- expect(items[3].filter).to be_nil- expect(items[3].has_filter?).to be_falsey- end-- it "has a specific category" do- expect(items.first.has_specific_category?).to be_falsey- expect(items.last.has_specific_category?).to be_truthy- end-- it "does not have a specific category" do- expect(items.first.specific_category).to be_nil- expect(items.last.specific_category).to eq('xyz')+ expect(items[0].name).to eq('categories')+ expect(items[1].name).to eq('latest')endend