Commit 81b875f0 authored by Jan Provaznik's avatar Jan Provaznik

Added tests for merge_request_status partial

parent b177d523
require 'spec_helper'
describe 'projects/issues/_merge_requests_status.html.haml' do
it 'shows date of status change in tooltip' do
merge_request = create(:merge_request, created_at: 1.month.ago)
render partial: 'projects/issues/merge_requests_status',
locals: { merge_request: merge_request, css_class: '' }
expect(rendered).to match("Opened.*about 1 month ago")
end
it 'shows only status in tooltip if date is not set' do
merge_request = create(:merge_request, created_at: 1.month.ago, state: :closed)
render partial: 'projects/issues/merge_requests_status',
locals: { merge_request: merge_request, css_class: '' }
expect(rendered).to match("Closed")
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment