Skip to content
This repository has been archived by the owner on Jul 15, 2019. It is now read-only.

Commit

Permalink
Merge pull request #106 from WeTransfer/gh-102-return-name-for-reques…
Browse files Browse the repository at this point in the history
…ted-experiment

Return a name of a requested experiment
  • Loading branch information
dsnipe authored Apr 19, 2017
2 parents cda305f + 55a5650 commit f32e07f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/xperiments/assigner/experiment.ex
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ defmodule Xperiments.Assigner.Experiment do
variant ->
{:ok,
%{id: state.id,
name: state.name,
state: state.state, # heh, looks stupid
start_date: state.start_date,
end_date: state.end_date,
Expand Down
1 change: 1 addition & 0 deletions test/controllers/assigner_controller_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ defmodule Xperiments.AssignerControllerTest do
post(context.conn, @api_path <> "/experiments", %{})
|> json_response(200)
assert length(body["assign"]) == 3
assert hd(body["assign"])["name"] # test that we return a name of a requested experiment
ids =
Xperiments.Repo.all(Xperiments.Experiment)
|> Enum.map(& &1.id)
Expand Down

0 comments on commit f32e07f

Please sign in to comment.