Sha256: 13d080befc81f519163a3348a31dba2ed0343f2c32abf9f2cd7b326f7a5cf5d9

Contents?: true

Size: 1.62 KB

Versions: 23

Compression:

Stored size: 1.62 KB

Contents

require 'rails_helper'
RSpec.describe Auth::Workflow::State, type: :model, :state_model => true do

	context " -- wrapper -- " do 

		before(:all) do 

			User.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 " -- create order flow -- " do 

			it " -- sets the required_value based on order number, as the default setter function  -- " do 
				
				### what is the calculation of requirement state and how does it work?
				##

			end


			## the next step is called on each individual requirement.
			## so here we will just check that it takes only non-schedulable requirements for the mark_requirements part.

		end

	end

end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
wordjelly-auth-1.0.5 spec/models/auth/workflow/state_model_spec.rb
wordjelly-auth-1.0.4 spec/models/auth/workflow/state_model_spec.rb
wordjelly-auth-1.0.3 spec/models/auth/workflow/state_model_spec.rb