Sha256: fa58319bb6e6131f4c32d1b334892e9ea9138508400885783620342527db7e21
Contents?: true
Size: 543 Bytes
Versions: 2
Compression:
Stored size: 543 Bytes
Contents
# -*- coding: utf-8 -*- require 'test_helper' class UsersControllerTest < ActionController::TestCase setup do User.create(:name => 'yalab', :age => '4', :secret => 'secret') I18n.locale = :ja @csv = User.all.to_csv(:encoding => 'SJIS', :fields => [:id, :name, :age]) end test "should get index" do get :index, :format => 'csv' assert_equal @csv, response.body end test "should get sjis" do get :sjis, :format => 'csv' assert_equal @csv, response.body end teardown do I18n.locale = :en end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
csv_rails-0.4.0 | test/dummy/test/functional/users_controller_test.rb |
csv_rails-0.3.0 | test/dummy/test/functional/users_controller_test.rb |