Skip to content
This repository was archived by the owner on Feb 16, 2022. It is now read-only.

Commit 37bece3

Browse files
authored
Merge pull request #3 from LendingHome/revert-2-develop
Revert "develop to master"
2 parents 7812c2f + 6b2afd2 commit 37bece3

File tree

2 files changed

+1
-19
lines changed

2 files changed

+1
-19
lines changed

apps/staging/lib/schemas/server.ex

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@ defmodule Staging.Server do
3131
end
3232

3333
def order_by_name(query) do
34-
from s in query, order_by: [
35-
fragment("regexp_matches(?, '^\D+')::text[]", s.name),
36-
fragment("regexp_matches(?, '\d+$')::int[]", s.name)
37-
]
34+
from s in query, order_by: s.name
3835
end
3936

4037
def archive_all(query) do

apps/staging/spec/staging_bot_spec.exs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,6 @@ defmodule Staging.BotSpec do
6262
end
6363
end
6464

65-
context "there are servers with numeric suffixes" do
66-
before do
67-
Factory.insert(:server, %{name: "qa-11", prod_data: false})
68-
Factory.insert(:server, %{name: "qa-1", prod_data: false})
69-
Factory.insert(:server, %{name: "beta-21", prod_data: false})
70-
Factory.insert(:server, %{name: "beta-2", prod_data: false})
71-
end
72-
73-
it "lists the servers alphabetically by name prefix then numerically by index suffix" do
74-
Bot.handle_event(%{type: "message", text: "#{@bot_name} list", channel: @channel, user: @message_user.id}, @slack, [])
75-
response = string_matching(~r/beta-2.+beta-21.+qa-1.+qa-11/iu)
76-
expect(@slack_send).to have_received([response, @channel, @slack])
77-
end
78-
end
79-
8065
context "some servers are archived" do
8166
before do
8267
Factory.insert(:server, %{name: "server-1", archived: false})

0 commit comments

Comments
 (0)