Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
49 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
require "spec_helper" | ||
|
||
describe Api::PointGroupsController do | ||
include Devise::Test::ControllerHelpers | ||
|
||
let(:user) { FactoryBot.create(:user) } | ||
let(:device) { user.device } | ||
let(:old_point_ids) do rando_points end | ||
|
||
it "shows a single point group" do | ||
PointGroup.destroy_all | ||
PointGroupItem.destroy_all | ||
sign_in device.users.first | ||
pg = PointGroups::Create | ||
.run!(device: device, point_ids: [], name: "PointGroups#show test") | ||
get :show, params: { id: pg.id } | ||
expect(response.status).to eq(200) | ||
expect(json.fetch(:name)).to eq pg.name | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
FactoryBot.define do | ||
factory :point_group do | ||
point_group_items | ||
name { Faker::Games::Pokemon.name } | ||
# point_group_items # TODO: Broke - RC 23 Sept 19 | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
:sensors, | ||
:sequences, | ||
:tools, | ||
:point_groups, | ||
]) | ||
|
||
it "is different this time!" do | ||
|