FIX: Server error when no results on user directory while logged in

This commit is contained in:
Robin Ward
2015-03-25 11:18:46 -04:00
parent e5c3266c30
commit 33e35930b0
2 changed files with 16 additions and 1 deletions

View File

@ -11,6 +11,21 @@ describe DirectoryItemsController do
response.should_not be_success
end
context "without data" do
context "and a logged in user" do
let!(:user) { log_in }
it "succeeds" do
xhr :get, :index, period: 'all'
response.should be_success
json = ::JSON.parse(response.body)
end
end
end
context "with data" do
before do
Fabricate(:user)