Sha256: fc855d1529fcadf0e0aaa44c2eaad8e0075556a874d66007b3929f4b93e93424

Contents?: true

Size: 701 Bytes

Versions: 2

Compression:

Stored size: 701 Bytes

Contents

# frozen_string_literal: true
require 'rails_helper'

RSpec.describe 'project_assignments/show', type: :view do
  let(:user) { FactoryBot.create(:user) }
  let(:project) { FactoryBot.create(:project, owner: user) }
  let(:project_assignment) { FactoryBot.create(:project_assignment, project: project, user: user) }
  before(:each) do
    assign(:project_assignment, project_assignment)
  end

  it 'renders attributes in <p>' do
    render
    expect(rendered).to match(/project1/)
    expect(rendered).to match(/user1@example.com/)
    expect(rendered).to match(localized_time_re('2020-03-22 09:50:00 +09:00'))
    expect(rendered).to match(localized_time_re('2020-03-22 23:40:00 +09:00'))
  end
end

Version data entries

2 entries across 1 versions & 1 rubygems

Version Path
model_base_generators-0.4.0 examples/rails-5.0/spec/views/project_assignments/show.html.erb_spec.rb
model_base_generators-0.4.0 examples/rails-5.1/spec/views/project_assignments/show.html.erb_spec.rb