Sha256: e26d4ec8674d1853741377128c4e400937eaef78058709e66fc49563efb26d40
Contents?: true
Size: 934 Bytes
Versions: 7
Compression:
Stored size: 934 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 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
7 entries across 7 versions & 1 rubygems