Sha256: c6517c053aa60abb5c090f979009903930ca3e7a84fc02df5fcc2383e6d46463

Contents?: true

Size: 762 Bytes

Versions: 3

Compression:

Stored size: 762 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] }
          before(:each){ pass_until_state_of workflow, is: :ready }

          it 'should call reload_data' do
            expect(workflow).to receive(:reload_data)
            post "/workflows/#{ workflow_type }/reload"
            expect(last_response.status).to eq 201
            expect(json).to be_nil
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cellect-server-3.0.2 spec/cellect/server/api/reload_spec.rb
cellect-server-3.0.1 spec/cellect/server/api/reload_spec.rb
cellect-server-3.0.0 spec/cellect/server/api/reload_spec.rb