Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/controllers/concerns/name_filterable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ def name_status_filters
# @return [Integer, Array<Integer>] The status value(s).
def map_status_to_value(status)
status = status.to_s.downcase
return nil if status == 'all'

status = 'icnafp' if status == 'icn'
name_status_filters[status] || status
end
Expand Down
7 changes: 7 additions & 0 deletions test/controllers/names_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,11 @@ class NamesControllerTest < ActionDispatch::IntegrationTest
assert name.observing?(@user)
assert_redirected_to name_url(name)
end

test 'user names includes draft names' do
get user_names_url

assert_response :success
assert_includes @response.body, names(:draft_by_contributor).name
end
end
5 changes: 5 additions & 0 deletions test/fixtures/names.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
unregistered:
name: MyString

draft_by_contributor:
name: Testimonas draftensis
status: 5 # draft
created_by: contributor

escherichia:
name: Escherichia
rank: genus
Expand Down
Loading