-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix saving search list #1305
Fix saving search list #1305
Conversation
37fc2a5
to
df2e894
Compare
df2e894
to
7bdb508
Compare
This could do with a test to show the bug |
7bdb508
to
13ef816
Compare
We were missing some specs for ListController so I've added those now. |
@@ -8,4 +8,45 @@ | |||
require 'spec_helper' | |||
|
|||
describe ListsController do | |||
|
Check notice
Code scanning / Rubocop
Keeps track of empty lines around block bodies. Note test
let(:list_url) { "/contacts?q%5Bs%5D%5B0%5D%5Bname%5D=&q%5Bs%5D%5B0%5D%5Bdir%5D=asc&q%5Bg%5D%5B0%5D%5Bm%5D=and&q%5Bg%5D%5B0%5D%5Bc%5D%5B0%5D%5Ba%5D%5B0%5D%5Bname%5D=first_name&q%5Bg%5D%5B0%5D%5Bc%5D%5B0%5D%5Bp%5D=cont&q%5Bg%5D%5B0%5D%5Bc%5D%5B0%5D%5Bv%5D%5B0%5D%5Bvalue%5D=test&distinct=1&page=1" } | ||
|
||
describe "global list items" do | ||
let(:list_name) { "Global list item"} |
Check notice
Code scanning / Rubocop
Checks that block braces have or don't have surrounding space. For blocks taking parameters, checks that the left brace has or doesn't have trailing space. Note test
end | ||
it "updating should be successful" do | ||
@list = List.create!(name: list_name, url: "/test") | ||
post :create, params: { list: { name: list_name, url: list_url }, is_global: is_global }, xhr: true |
Check notice
Code scanning / Rubocop
Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a => 1, :b => 2 }. Note test
end | ||
|
||
describe "personal list items" do | ||
let(:list_name) { "Personal list item"} |
Check notice
Code scanning / Rubocop
Checks that block braces have or don't have surrounding space. For blocks taking parameters, checks that the left brace has or doesn't have trailing space. Note test
expect(response).to render_template("lists/create") | ||
end | ||
end | ||
|
Check notice
Code scanning / Rubocop
Keeps track of empty lines around block bodies. Note test
Updated model with optional and controller saving with attr