Sha256: 2b0430f897d2a1b61bb9cd360b36ddfaf8fc88b2879e196aadf002c599b0b3ff
Contents?: true
Size: 855 Bytes
Versions: 10
Compression:
Stored size: 855 Bytes
Contents
require 'test_helper' require 'generators/shopify_app/routes/routes_generator' class ControllerGeneratorTest < Rails::Generators::TestCase tests ShopifyApp::Generators::RoutesGenerator destination File.expand_path("../tmp", File.dirname(__FILE__)) setup do prepare_destination provide_existing_routes_file provide_existing_initializer_file end test "copies ShopifyApp routes to the host application" do run_generator assert_file "config/routes.rb" do |routes| assert_match "get 'login' => :new, :as => :login", routes assert_match "post 'login' => :create, :as => :authenticate", routes assert_match "get 'auth/shopify/callback' => :callback", routes assert_match "get 'logout' => :destroy, :as => :logout", routes refute_match "mount ShopifyApp::Engine, at: '/'", routes end end end
Version data entries
10 entries across 10 versions & 1 rubygems