Sha256: 77985fd2773b4e31e07297d7938cfaa49c0a29e43b2c44d4eb2f82acb1d60da4

Contents?: true

Size: 1008 Bytes

Versions: 6

Compression:

Stored size: 1008 Bytes

Contents

module Refinery
  module Testing
    module FeatureMacros
      module Authentication
        def refinery_login_with(factory)
          let!(:logged_in_user) { FactoryGirl.create(factory) }

          before do
            login_as logged_in_user, :scope => :refinery_user
          end
        end

        def login_refinery_user
          Refinery.deprecate(:login_refinery_user, :when => '2.2', :replacement => 'refinery_login_with :refinery_user')
          refinery_login_with(:refinery_user)
        end

        def login_refinery_superuser
          Refinery.deprecate(:login_refinery_superuser, :when => '2.2', :replacement => 'refinery_login_with :refinery_superuser')
          refinery_login_with(:refinery_superuser)
        end

        def login_refinery_translator
          Refinery.deprecate(:login_refinery_translator, :when => '2.2', :replacement => 'refinery_login_with :refinery_translator')
          refinery_login_with(:refinery_translator)
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
refinerycms-testing-2.1.5 lib/refinery/testing/feature_macros/authentication.rb
refinerycms-testing-2.1.4 lib/refinery/testing/feature_macros/authentication.rb
refinerycms-testing-2.1.3 lib/refinery/testing/feature_macros/authentication.rb
refinerycms-testing-2.1.2 lib/refinery/testing/feature_macros/authentication.rb
refinerycms-testing-2.1.1 lib/refinery/testing/feature_macros/authentication.rb
refinerycms-testing-2.1.0 lib/refinery/testing/feature_macros/authentication.rb