Sha256: 3665b58a9174eb54c2de0c67482abf3b46e1b490685f71329c456b6e170dca2d

Contents?: true

Size: 454 Bytes

Versions: 1

Compression:

Stored size: 454 Bytes

Contents

# coding: utf-8
require 'spec_helper'

describe SessionsController do
  let!(:user) { User.create!(name: 'akiinyo') }

  describe 'destroy' do
    before {
      controller.sign_in user
      delete :destroy, {id: user.id}
    }

    specify 'meがいなくなること' do
      controller.me?.should be_false
    end

    specify 'トップページへリダイレクトされること' do
      response.should redirect_to(root_url)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
current_me-0.0.3 spec/dummy/spec/controllers/sessions_controller_spec.rb