Sha256: 2620ff05abf897734d30d236520834c16ac1343d7a62cfab4b0307b685d78419
Contents?: true
Size: 707 Bytes
Versions: 1
Compression:
Stored size: 707 Bytes
Contents
require 'rails_helper' RSpec.describe MutantsController do describe 'GET \'index\'' do it 'returns a MicroSession::Store instance' do get :index expect(subject.micro_session).to be_kind_of(MicroSession::Store) end context 'when there is no data stored in the session' do it 'returns an empty hash' do get :index expect(subject.micro_session.to_h).to be_empty end end context 'when there is data stored in the session' do before do subject.micro_session['test'] = 'test' end it 'returns stored data' do get :index expect(subject.micro_session.to_h).to eq(test: 'test') end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
micro_sessions-0.4.0 | spec/controllers/mutants_controller_spec.rb |