-
Notifications
You must be signed in to change notification settings - Fork 737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2143 - display bookmarked moments in care plan #2154
Changes from 1 commit
08bd152
2e083e9
15b647f
2b2ecdc
45acadb
1a3267f
4f272ae
37ec9aa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* eslint no-console:0 */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's delete this file since it's not necessary! |
||
// This file is automatically compiled by Webpack, along with any other files | ||
// present in this directory. You're encouraged to place your actual application logic in | ||
// a relevant structure within app/javascript and only use these pack files to reference | ||
// that code so it'll be compiled. | ||
// | ||
// To reference this file, add <%= javascript_pack_tag 'application' %> to the appropriate | ||
// layout file, like app/views/layouts/application.html.erb | ||
|
||
|
||
// Uncomment to copy all static images under ../images to the output folder and reference | ||
// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>) | ||
// or the `imagePath` JavaScript helper below. | ||
// | ||
// const images = require.context('../images', true) | ||
// const imagePath = (name) => images(name, true) | ||
|
||
console.log('Hello World from Webpacker') |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
process.env.NODE_ENV = process.env.NODE_ENV || 'development' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's also remove this file! |
||
|
||
const environment = require('./environment') | ||
|
||
module.exports = environment.toWebpackConfig() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const { environment } = require('@rails/webpacker') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's also remove this file! |
||
|
||
module.exports = environment |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
process.env.NODE_ENV = process.env.NODE_ENV || 'production' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's also remove this file! |
||
|
||
const environment = require('./environment') | ||
|
||
module.exports = environment.toWebpackConfig() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
process.env.NODE_ENV = process.env.NODE_ENV || 'development' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's also remove this file! |
||
|
||
const environment = require('./environment') | ||
|
||
module.exports = environment.toWebpackConfig() |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,17 @@ | |
expect(response.body).to include(strategy.name) | ||
end | ||
end | ||
|
||
context 'when there are bookmarked moments' do | ||
let!(:strategy_bm) { create(:strategy, user: user, bookmarked: true) } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test should replace the strategy variables with moment ones! |
||
let!(:strategy_no_bm) { create(:strategy, name: 'Not bookmarked', user: user) } | ||
|
||
it 'assigns bookmarked_strategies' do | ||
get care_plan_path | ||
expect(response.body).to include(strategy_bm.name) | ||
expect(response.body).to_not include(strategy_no_bm.name) | ||
end | ||
end | ||
end | ||
|
||
context 'when user is not signed in' do | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checked: @moment.bookmarked
should bechecked: params[:bookmarked] ? true : @moment.bookmarked
so that when you create a Moment from the Care Plan page, it will automatically be bookmarked.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah gotcha, updated now.