Sha256: 707671964bc9f87c2e4e122d96fb120d48ad9b3b4583666115f1a8e15320682e
Contents?: true
Size: 840 Bytes
Versions: 14
Compression:
Stored size: 840 Bytes
Contents
require 'rails_helper' describe 'PCからのアクセスの場合', type: :request do before do @headers = { 'HTTP_USER_AGENT' => 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322)', } end it 'request.mobile は nil であるべき' do get '/mobile_spec/index', params: {}, env: @headers expect(request.mobile).to be_nil end it 'request.mobile? は false であるべき' do get '/mobile_spec/index', params: {}, env: @headers expect(request.mobile?).to be_falsey end context 'routesが存在しない場合' do it 'ActionController::RoutingErrorをraiseする' do expect { get '/not_exist', params: {}, env: @headers }.to raise_error ActionController::RoutingError end end end
Version data entries
14 entries across 14 versions & 1 rubygems