Sha256: c7c52bf8a375a14286ae310f7923c9c1e5ed6fd44283f1a441b4dd64421fd5c7

Contents?: true

Size: 994 Bytes

Versions: 2

Compression:

Stored size: 994 Bytes

Contents

# -*- coding: utf-8 -*-
require File.expand_path(File.join(File.dirname(__FILE__), '/../../spec_helper'))

describe Admin::TopController do
  describe "GET 'full_path'" do
    before do
      page.driver.header('user_agent', user_agent)
    end

    context "PCからのアクセスの場合" do
      let(:user_agent) do
        "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 '_partial.html.erbが使用されること' do
        visit '/admin/top/full_path'

        page.should have_content("_partial.html.erb")
      end
    end

    context "DoCoMoからのアクセスの場合" do
      let(:user_agent) do
        "DoCoMo/2.0 SH902i(c100;TB;W24H12)"
      end
      it '_partial_mobile_docomo.html.erbが使用されること' do
        visit '/admin/top/full_path'

        page.should have_content("_partial_mobile_docomo.html.erb")
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jpmobile-4.1.0 test/rails/overrides/spec/features/admin/top_spec.rb
jpmobile-4.1.0.rc1 test/rails/overrides/spec/features/admin/top_spec.rb