Sha256: 06b8182eb778c1a1364ed3a3da6f0ecb9d0d617663a6a1375673da294bd3a157

Contents?: true

Size: 781 Bytes

Versions: 10

Compression:

Stored size: 781 Bytes

Contents

module Kaname
  module Adapter
    class Mock
      def find_user(name)
        {"name" => name}
      end

      def create_user(name, email)
        puts "Create User: #{name} #{email}"
        {"name" => name}
      end

      def create_user_role(tenant, user_hash, role)
        puts "Create User Role: #{tenant} #{user_hash["name"]} #{role}"
      end

      def delete_user(name)
        puts "Delete User: #{name}"
      end

      def delete_user_role(tenant, user_hash, role)
        puts "Delete User Role: #{tenant} #{user_hash["name"]} #{role}"
      end

      def change_user_role(tenant, user_hash, before_role, after_role)
        delete_user_role(tenant, user_hash, before_role)
        create_user_role(tenant, user_hash, after_role)
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
kaname-0.4.0 lib/kaname/adapter/mock.rb
kaname-0.3.3 lib/kaname/adapter/mock.rb
kaname-0.3.2 lib/kaname/adapter/mock.rb
kaname-0.3.1 lib/kaname/adapter/mock.rb
kaname-0.3.0 lib/kaname/adapter/mock.rb
kaname-0.2.0 lib/kaname/adapter/mock.rb
kaname-0.1.6 lib/kaname/adapter/mock.rb
kaname-0.1.5 lib/kaname/adapter/mock.rb
kaname-0.1.4 lib/kaname/adapter/mock.rb
kaname-0.1.3 lib/kaname/adapter/mock.rb