blob: cc2ec41b4a64462649bf3df5c6936802cc57ca3e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe AdminGeneralController do
describe "when viewing front page of admin interface" do
render_views
before { basic_auth_login @request }
it "should render the front page" do
get :index
response.should render_template('index')
end
end
describe 'when viewing the timeline' do
it 'should assign an array of events in order of descending date to the view' do
get :timeline, :all => 1
previous_event = nil
previous_event_at = nil
assigns[:events].each do |event, event_at|
if previous_event
(event_at <= previous_event_at).should be_true
end
previous_event = event
previous_event_at = event_at
end
end
end
end
|