Sha256: ee6be3d0eff1ec1be7b29a55ae8b3ce385bc2083fc7094a762852a74fa305629

Contents?: true

Size: 777 Bytes

Versions: 1

Compression:

Stored size: 777 Bytes

Contents

require 'spec_helper'

module Logical
  module Naf
    module JobStatuses

      describe Running do

        context "no conditions" do
          
          let!(:conditions) { "" }

          it "returns executable query" do
            expect { ActiveRecord::Base.connection.execute(Running.all(conditions)) }.to_not raise_error
          end

        end

        context "with conditions" do

          let!(:conditions) { "TEST STRING" }

          it "adds conditions to returned sql string" do
            expect(Running.all(conditions).include?(conditions)).to be_true
          end

          it "accepts a status argument as well" do
            expect { Running.all(:queued, conditions) }.to_not raise_error
          end

        end

      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
naf-2.1.13 spec/models/logical/naf/job_statuses/running_spec.rb