mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
add top page
This commit is contained in:
parent
b90e811825
commit
567d2bd23c
57 changed files with 532 additions and 324 deletions
|
@ -13,14 +13,14 @@ describe ListController do
|
|||
|
||||
describe 'indexes' do
|
||||
|
||||
[:latest, :hot].each do |filter|
|
||||
Discourse.anonymous_filters.each do |filter|
|
||||
context "#{filter}" do
|
||||
before { xhr :get, filter }
|
||||
it { should respond_with(:success) }
|
||||
end
|
||||
end
|
||||
|
||||
[:favorited, :read, :posted, :unread, :new].each do |filter|
|
||||
Discourse.logged_in_filters.each do |filter|
|
||||
context "#{filter}" do
|
||||
it { expect { xhr :get, filter }.to raise_error(Discourse::NotLoggedIn) }
|
||||
end
|
||||
|
@ -39,7 +39,7 @@ describe ListController do
|
|||
|
||||
describe 'RSS feeds' do
|
||||
|
||||
[:latest, :hot].each do |filter|
|
||||
Discourse.anonymous_filters.each do |filter|
|
||||
|
||||
it 'renders RSS' do
|
||||
get "#{filter}_feed", format: :rss
|
||||
|
@ -175,14 +175,6 @@ describe ListController do
|
|||
end
|
||||
end
|
||||
|
||||
context 'hot' do
|
||||
before do
|
||||
xhr :get, :hot
|
||||
end
|
||||
|
||||
it { should respond_with(:success) }
|
||||
end
|
||||
|
||||
context 'favorited' do
|
||||
it 'raises an error when not logged in' do
|
||||
lambda { xhr :get, :favorited }.should raise_error(Discourse::NotLoggedIn)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue