Sha256: 04b1437ace87515c5243acf8a43f9514e318fa1d4405c0747b2c76f9c23c0ee6
Contents?: true
Size: 1.05 KB
Versions: 1
Compression:
Stored size: 1.05 KB
Contents
# frozen_string_literal: true require 'spec_helper' Dir.glob('./lib/ditty/controllers/*.rb').each { |f| require f } require 'support/api_shared_examples' describe ::Ditty::RolesController, type: :controller do def app described_class end let(:user) { create(:super_admin_user) } before do env 'rack.session', 'user_id' => user.id end it_behaves_like 'an API interface', :role, {} end describe ::Ditty::UsersController, type: :controller do def app described_class end let(:user) { create(:super_admin_user) } before { env 'rack.session', 'user_id' => user.id } params = { identity: { username: 'test-user@abc.abc', password: 'som3Password!', password_confirmation: 'som3Password!' } } it_behaves_like 'an API interface', :user, params end describe ::Ditty::UserLoginTraitsController, type: :controller do def app described_class end let(:user) { create(:super_admin_user) } before { env 'rack.session', 'user_id' => user.id } it_behaves_like 'an API interface', :user_login_trait, {} end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ditty-0.9.1 | spec/ditty/api_spec.rb |