Sha256: b7990eb4ae1211f1ebbaf7d989c7650e6404eb7d111c563c7c9648e24a87f1ea
Contents?: true
Size: 1.52 KB
Versions: 23
Compression:
Stored size: 1.52 KB
Contents
require "rails_helper" RSpec.describe "order request spec",:orders => true, :workflow => true, :type => :request do before(:all) do User.delete_all Auth::Workflow::Assembly.delete_all ## create one non admin user @u = User.new(attributes_for(:user_confirmed)) @u.save @c = Auth::Client.new(:resource_id => @u.id, :api_key => "test", :app_ids => ["testappid"]) @c.redirect_urls = ["http://www.google.com"] @c.versioned_create @u.client_authentication["testappid"] = "testestoken" @u.save @ap_key = @c.api_key @headers = { "CONTENT_TYPE" => "application/json" , "ACCEPT" => "application/json", "X-User-Token" => @u.authentication_token, "X-User-Es" => @u.client_authentication["testappid"], "X-User-Aid" => "testappid"} ## create one admin user. @admin = User.new(attributes_for(:admin_confirmed)) @admin.admin = true @admin.client_authentication["testappid"] = "testestoken2" @admin.save @admin_headers = { "CONTENT_TYPE" => "application/json" , "ACCEPT" => "application/json", "X-User-Token" => @admin.authentication_token, "X-User-Es" => @admin.client_authentication["testappid"], "X-User-Aid" => "testappid"} end context " -- json requests -- " do before(:example) do Auth::Workflow::Assembly.delete_all end after(:example) do Auth::Workflow::Assembly.delete_all end context " -- create -- " do it " -- receives create order, request, and fires clone on assembly -- " do end end end end
Version data entries
23 entries across 23 versions & 1 rubygems