Sha256: f3a335c27782ac24e5a1e49c538f51cd407febfc534ba5b65ffba1043e2580dc
Contents?: true
Size: 918 Bytes
Versions: 1
Compression:
Stored size: 918 Bytes
Contents
require 'rails_helper' describe 'TestHelper', type: :controller do describe '#with_popup_reloading_path' do context 'when popup is going to be reloaded' do it 'returns reloading url' do session[:_with_popup] = '/path/to' expect(with_popup_reloading_path).to eql '/path/to' end end context 'when popup is closing' do it 'returns nil' do session[:_with_popup] = :close expect(with_popup_reloading_path).to be_nil end end end describe '#with_popup_is_closing?' do context 'when popup is going to be reloaded' do it 'returns false' do session[:_with_popup] = '/path/to' expect(with_popup_is_closing?).to be_falsy end end context 'when popup is closing' do it 'returns nil' do session[:_with_popup] = :close expect(with_popup_is_closing?).to be_truthy end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
with_popup-0.1.0 | spec/controllers/test_helper_spec.rb |