Sha256: c7b7d364a60748400cc07c50e52e6c72a287aaf52a7ba995d2f621185c84807d

Contents?: true

Size: 551 Bytes

Versions: 15

Compression:

Stored size: 551 Bytes

Contents

require "spec_helper"

describe UsersController do
  let(:user) { create :user }

  render_views

  before do
    require "jquery-rails"

    I18n.locale = :en
  end

  it "#index" do
    user
    get :index
    expect(response).to be_success
    expect(assigns(:users)).to include user
  end

  it "#update" do
    patch :update, id: user.id, user: {email: "newemail@example.com"}
    expect(response).to redirect_to user_url(user)

    # Ensure correct key
    expect(flash[:notice]).to eq "translation missing: en.users.user_was_updated"
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
awesome_translations-0.0.40 spec/controllers/users_controller_spec.rb
awesome_translations-0.0.39 spec/controllers/users_controller_spec.rb
awesome_translations-0.0.38 spec/controllers/users_controller_spec.rb
awesome_translations-0.0.37 spec/controllers/users_controller_spec.rb
awesome_translations-0.0.36 spec/controllers/users_controller_spec.rb
awesome_translations-0.0.35 spec/controllers/users_controller_spec.rb
awesome_translations-0.0.34 spec/controllers/users_controller_spec.rb
awesome_translations-0.0.33 spec/controllers/users_controller_spec.rb
awesome_translations-0.0.32 spec/controllers/users_controller_spec.rb
awesome_translations-0.0.31 spec/controllers/users_controller_spec.rb
awesome_translations-0.0.30 spec/controllers/users_controller_spec.rb
awesome_translations-0.0.29 spec/controllers/users_controller_spec.rb
awesome_translations-0.0.28 spec/controllers/users_controller_spec.rb
awesome_translations-0.0.27 spec/controllers/users_controller_spec.rb
awesome_translations-0.0.26 spec/controllers/users_controller_spec.rb