Skip to content

Instantly share code, notes, and snippets.

@oleglukashev
Created January 13, 2016 19:15
Show Gist options
  • Save oleglukashev/14c3659130d6619a5c5e to your computer and use it in GitHub Desktop.
Save oleglukashev/14c3659130d6619a5c5e to your computer and use it in GitHub Desktop.
require 'rails_helper'
describe Admin::Employees::CheckinsController do
login_admin
before(:all) do
@tenant = create(:tenant)
Tenant.set_current_tenant(@tenant)
end
describe 'GET #index' do
let!(:checkin) { create :checkin }
before do
puts Checkin.all.size
get :index
puts Checkin.all.size
end
it 'returns http success' do
expect(response).to be_success
expect(response).to have_http_status(:ok)
end
it 'list of checkins' do
expect(assigns(:checkins).size).to eq 1
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment