Sha256: 3c39d19705cc29a5a36c7ddbd99485527948e70d9389efabc55ccc61f04edc46
Contents?: true
Size: 929 Bytes
Versions: 2
Compression:
Stored size: 929 Bytes
Contents
require 'spec_helper' module Cellect::Server describe API do include_context 'API' { 'Ungrouped' => nil, 'Grouped' => 'grouped' }.each_pair do |grouping_type, grouping| SET_TYPES.shuffle.each do |set_type| context "#{ grouping_type } #{ set_type }" do let(:workflow_type){ [grouping, set_type].compact.join '_' } let(:workflow){ Workflow[workflow_type] } let(:user){ workflow.user 123 } before(:each){ pass_until_state_of workflow, is: :ready } it 'should add seen subjects' do async_workflow = double expect(workflow).to receive(:async).and_return async_workflow expect(async_workflow).to receive(:add_seen_for).with 123, 123 put "/workflows/#{ workflow_type }/users/123/add_seen", subject_id: 123 expect(last_response.status).to eq 200 end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cellect-server-1.3.1 | spec/server/api/add_seen_spec.rb |
cellect-server-1.3.0 | spec/server/api/add_seen_spec.rb |