mirror of
https://github.com/internetee/registry.git
synced 2025-07-01 00:33:36 +02:00
Updated creator helper
This commit is contained in:
parent
7bc517530c
commit
717de1c886
2 changed files with 5 additions and 1 deletions
|
@ -20,6 +20,7 @@ module ApplicationHelper
|
|||
|
||||
def creator_link(model)
|
||||
return 'not present' if model.blank?
|
||||
return 'unknown' if model.creator.blank?
|
||||
return model.creator if model.creator.is_a? String
|
||||
|
||||
# can be api user or some other user
|
||||
|
@ -28,6 +29,7 @@ module ApplicationHelper
|
|||
|
||||
def updator_link(model)
|
||||
return 'not present' if model.blank?
|
||||
return 'unknown' if model.updator.blank?
|
||||
return model.updator if model.updator.is_a? String
|
||||
|
||||
# can be api user or some other user
|
||||
|
|
|
@ -20,6 +20,8 @@ feature 'Admin contact', type: :feature do
|
|||
visit admin_contacts_url
|
||||
|
||||
click_link('Mr John')
|
||||
page.should have_content('by autotest')
|
||||
# initially it's created by unknown,
|
||||
# indivitually running it's created by autotest
|
||||
page.should have_content(/by [unknown|autotest]/)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue