Sha256: de26987258ab713b8b462a6c3234cf21f0d5f19e2130c2e7d8a84d476c966c1a

Contents?: true

Size: 847 Bytes

Versions: 6

Compression:

Stored size: 847 Bytes

Contents

require "spec_helper"
require "fileutils"

describe AwesomeTranslations::HandlersController do
  routes { AwesomeTranslations::Engine.routes }

  render_views

  it "#index" do
    get :index
    expect(response).to be_success
  end

  it "#show" do
    AwesomeTranslations::CacheDatabaseGenerator.current.cache_translations
    get :show, id: "model_handler"
    expect(response).to be_success
  end

  it "#update_cache" do
    request.env["HTTP_REFERER"] = handlers_path
    post :update_cache
    expect(response).to redirect_to :handlers
  end

  it "#update_groups_cache" do
    AwesomeTranslations::CacheDatabaseGenerator.current.cache_translations
    request.env["HTTP_REFERER"] = handler_path("rails_handler")
    post :update_groups_cache, id: "rails_handler"
    expect(response).to redirect_to handler_path("rails_handler")
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
awesome_translations-0.0.38 spec/controllers/handlers_controller_spec.rb
awesome_translations-0.0.37 spec/controllers/handlers_controller_spec.rb
awesome_translations-0.0.36 spec/controllers/handlers_controller_spec.rb
awesome_translations-0.0.35 spec/controllers/handlers_controller_spec.rb
awesome_translations-0.0.34 spec/controllers/handlers_controller_spec.rb
awesome_translations-0.0.33 spec/controllers/handlers_controller_spec.rb