diaspora/spec/controllers/multis_controller_spec.rb
2012-01-07 14:23:24 -08:00

30 lines
751 B
Ruby

# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
require 'spec_helper'
describe MultisController do
describe '#index' do
before do
@old_spotlight_value = AppConfig[:community_spotlight]
sign_in :user, alice
end
after do
AppConfig[:community_spotlight] = @old_spotlight_value
end
it 'succeeds' do
AppConfig[:community_spotlight] = [bob.person.diaspora_handle]
get :index
response.should be_success
end
it 'succeeds without AppConfig[:community_spotlight]' do
AppConfig[:community_spotlight] = nil
get :index
response.should be_success
end
end
end