Sha256: 0194804d1a562d7df699a5635dd26f4f032af13effd81d9ee7b3f1800bd3a5b7

Contents?: true

Size: 615 Bytes

Versions: 16

Compression:

Stored size: 615 Bytes

Contents

require 'rails_helper'

RSpec.describe UserProjectJob, type: :model do

  it "should delegate user name" do
    UserProjectJob.make.name.should_not == nil
  end

  it "should delegate user email" do
    UserProjectJob.make.email.should_not == nil
  end

  it "should delegate job title" do
    UserProjectJob.make.title.should_not == nil
  end

  it "should scope job options by project" do
    ProjectJob.make!
    ProjectJob.make!

    p = Project.make!
    j = Job.make!
    p.jobs.push j
    p.save
    UserProjectJob.make!(project: p, job: j)
    UserProjectJob.options_for_job(p).should == p.jobs
  end


end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
introspective_grape-0.6.1 spec/models/user_project_job_spec.rb
introspective_grape-0.5.7 spec/models/user_project_job_spec.rb
introspective_grape-0.5.6 spec/models/user_project_job_spec.rb
introspective_grape-0.5.5 spec/models/user_project_job_spec.rb
introspective_grape-0.5.4 spec/models/user_project_job_spec.rb
introspective_grape-0.5.2 spec/models/user_project_job_spec.rb
introspective_grape-0.5.0 spec/models/user_project_job_spec.rb
introspective_grape-0.4.3 spec/models/user_project_job_spec.rb
introspective_grape-0.4.2 spec/models/user_project_job_spec.rb
introspective_grape-0.4.1 spec/models/user_project_job_spec.rb
introspective_grape-0.4.0 spec/models/user_project_job_spec.rb
introspective_grape-0.3.9 spec/models/user_project_job_spec.rb
introspective_grape-0.3.7 spec/models/user_project_job_spec.rb
introspective_grape-0.3.6 spec/models/user_project_job_spec.rb
introspective_grape-0.3.5 spec/models/user_project_job_spec.rb
introspective_grape-0.3.3 spec/models/user_project_job_spec.rb