enju_question 0.3.0.beta.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/enju_question/version.rb +1 -1
- data/spec/controllers/answers_controller_spec.rb +10 -10
- data/spec/controllers/questions_controller_spec.rb +12 -12
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78a87df0aa8699a16d7a9726074f6cf4f646134d
|
4
|
+
data.tar.gz: 9c626498abdca2978b103444553b5735215dc40a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba94bffafdca63907ecde502386619f35a7d67c9cf7bbaa68894b8d517fe347de4b049c4cf377bb17c9e02acc199e4dd3372031c606f74f404003e5b8292d866
|
7
|
+
data.tar.gz: 5ec73e71d8325a10ce6de11da9991d966ac1f21f5d1d04c275793aa20b937f1185d29d2e1d3268be56b74f76e5f781f1b7956578a889bd046316eecae311490b
|
@@ -38,7 +38,7 @@ describe AnswersController do
|
|
38
38
|
|
39
39
|
it "should get to my index if user_id is specified" do
|
40
40
|
get :index, params: { user_id: users(:user1).username }
|
41
|
-
response.should
|
41
|
+
response.should be_successful
|
42
42
|
assigns(:answers).should eq users(:user1).answers.order('answers.id DESC').page(1)
|
43
43
|
end
|
44
44
|
|
@@ -49,7 +49,7 @@ describe AnswersController do
|
|
49
49
|
|
50
50
|
it "should get my index feed" do
|
51
51
|
get :index, params: { user_id: users(:user1).username, format: 'rss' }
|
52
|
-
response.should
|
52
|
+
response.should be_successful
|
53
53
|
assigns(:answers).should_not be_empty
|
54
54
|
end
|
55
55
|
|
@@ -69,12 +69,12 @@ describe AnswersController do
|
|
69
69
|
it "should not get index with other user's question_id" do
|
70
70
|
get :index, params: { question_id: 1 }
|
71
71
|
assigns(:answers).should eq assigns(:question).answers.order('answers.id DESC').page(1)
|
72
|
-
response.should
|
72
|
+
response.should be_successful
|
73
73
|
end
|
74
74
|
|
75
75
|
it "should get other user's index if question is shared" do
|
76
76
|
get :index, params: { question_id: 5 }
|
77
|
-
response.should
|
77
|
+
response.should be_successful
|
78
78
|
assigns(:answers).should eq assigns(:question).answers.order('answers.id DESC').page(1)
|
79
79
|
end
|
80
80
|
|
@@ -85,7 +85,7 @@ describe AnswersController do
|
|
85
85
|
|
86
86
|
it "should get other user's index feed if question is shared" do
|
87
87
|
get :index, params: { question_id: 5, format: 'rss' }
|
88
|
-
response.should
|
88
|
+
response.should be_successful
|
89
89
|
assigns(:answers).should eq assigns(:question).answers.order('answers.id DESC').page(1)
|
90
90
|
end
|
91
91
|
end
|
@@ -172,7 +172,7 @@ describe AnswersController do
|
|
172
172
|
it "should show public_answer" do
|
173
173
|
get :show, params: { id: 1, question_id: 1 }
|
174
174
|
assigns(:answer).should eq(Answer.find(1))
|
175
|
-
response.should
|
175
|
+
response.should be_successful
|
176
176
|
end
|
177
177
|
|
178
178
|
it "should not show private answer" do
|
@@ -216,7 +216,7 @@ describe AnswersController do
|
|
216
216
|
it "should get new template with question_id" do
|
217
217
|
get :new, params: { question_id: 1 }
|
218
218
|
assigns(:answer).should_not be_valid
|
219
|
-
response.should
|
219
|
+
response.should be_successful
|
220
220
|
end
|
221
221
|
end
|
222
222
|
|
@@ -261,7 +261,7 @@ describe AnswersController do
|
|
261
261
|
|
262
262
|
it "should edit my answer without user_id" do
|
263
263
|
get :edit, params: { id: 3, question_id: 1 }
|
264
|
-
response.should
|
264
|
+
response.should be_successful
|
265
265
|
end
|
266
266
|
|
267
267
|
it "should not edit other answer without user_id" do
|
@@ -271,7 +271,7 @@ describe AnswersController do
|
|
271
271
|
|
272
272
|
it "should edit answer without question_id" do
|
273
273
|
get :edit, params: { id: 3, user_id: users(:user1).username }
|
274
|
-
response.should
|
274
|
+
response.should be_successful
|
275
275
|
end
|
276
276
|
|
277
277
|
it "should not edit missing answer" do
|
@@ -283,7 +283,7 @@ describe AnswersController do
|
|
283
283
|
|
284
284
|
it "should edit my answer" do
|
285
285
|
get :edit, params: { id: 3, user_id: users(:user1).username, question_id: 1 }
|
286
|
-
response.should
|
286
|
+
response.should be_successful
|
287
287
|
end
|
288
288
|
|
289
289
|
it "should not edit other user's answer" do
|
@@ -41,25 +41,25 @@ describe QuestionsController do
|
|
41
41
|
|
42
42
|
it "should get my index feed" do
|
43
43
|
get :index, format: :rss
|
44
|
-
response.should
|
44
|
+
response.should be_successful
|
45
45
|
assigns(:questions).should eq Question.public_questions.order(:updated_at).page(1)
|
46
46
|
end
|
47
47
|
|
48
48
|
it "should redirect_to my index feed if user_id is specified" do
|
49
49
|
get :index, params: { user_id: users(:user1).username, format: 'rss' }
|
50
|
-
response.should
|
50
|
+
response.should be_successful
|
51
51
|
assigns(:questions).should eq users(:user1).questions
|
52
52
|
end
|
53
53
|
|
54
54
|
it "should get other user's index" do
|
55
55
|
get :index, params: { user_id: users(:user2).username }
|
56
|
-
response.should
|
56
|
+
response.should be_successful
|
57
57
|
assigns(:questions).should_not be_empty
|
58
58
|
end
|
59
59
|
|
60
60
|
it "should get other user's index feed" do
|
61
61
|
get :index, params: { user_id: users(:user2).username, format: 'rss' }
|
62
|
-
response.should
|
62
|
+
response.should be_successful
|
63
63
|
assigns(:questions).should_not be_empty
|
64
64
|
end
|
65
65
|
end
|
@@ -72,14 +72,14 @@ describe QuestionsController do
|
|
72
72
|
|
73
73
|
it "should get index with query", vcr: true do
|
74
74
|
get :index, params: { query: 'Yahoo' }
|
75
|
-
response.should
|
75
|
+
response.should be_successful
|
76
76
|
assigns(:questions).should_not be_nil
|
77
77
|
assigns(:crd_results).should_not be_nil
|
78
78
|
end
|
79
79
|
|
80
80
|
it "should render crd_xml template", vcr: true do
|
81
81
|
get :index, params: { query: 'Yahoo', mode: 'crd', format: :xml }
|
82
|
-
response.should
|
82
|
+
response.should be_successful
|
83
83
|
response.should render_template("questions/index_crd")
|
84
84
|
end
|
85
85
|
end
|
@@ -118,7 +118,7 @@ describe QuestionsController do
|
|
118
118
|
|
119
119
|
it "should show other user's question" do
|
120
120
|
get :show, params: { id: 5 }
|
121
|
-
response.should
|
121
|
+
response.should be_successful
|
122
122
|
end
|
123
123
|
|
124
124
|
it "should not show missing question" do
|
@@ -131,13 +131,13 @@ describe QuestionsController do
|
|
131
131
|
it "should show my question" do
|
132
132
|
get :show, params: { id: 3 }
|
133
133
|
assigns(:question).should eq Question.find(3)
|
134
|
-
response.should
|
134
|
+
response.should be_successful
|
135
135
|
end
|
136
136
|
|
137
137
|
it "should show other user's shared question" do
|
138
138
|
get :show, params: { id: 5 }
|
139
139
|
assigns(:question).should eq Question.find(5)
|
140
|
-
response.should
|
140
|
+
response.should be_successful
|
141
141
|
end
|
142
142
|
end
|
143
143
|
|
@@ -149,7 +149,7 @@ describe QuestionsController do
|
|
149
149
|
|
150
150
|
it "should show crd xml" do
|
151
151
|
get :show, params: { id: @question.id, mode: 'crd', format: :xml }
|
152
|
-
response.should
|
152
|
+
response.should be_successful
|
153
153
|
response.should render_template("questions/show_crd")
|
154
154
|
end
|
155
155
|
end
|
@@ -237,7 +237,7 @@ describe QuestionsController do
|
|
237
237
|
|
238
238
|
it "should edit my question" do
|
239
239
|
get :edit, params: { id: 3 }
|
240
|
-
response.should
|
240
|
+
response.should be_successful
|
241
241
|
end
|
242
242
|
end
|
243
243
|
|
@@ -402,7 +402,7 @@ describe QuestionsController do
|
|
402
402
|
it "should not update my question without body" do
|
403
403
|
put :update, params: { id: 3, question: { body: "" } }
|
404
404
|
assigns(:question).should_not be_valid
|
405
|
-
response.should
|
405
|
+
response.should be_successful
|
406
406
|
end
|
407
407
|
|
408
408
|
it "should not update missing question" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enju_question
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.0
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kosuke Tanabe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: enju_bookmark
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.3.0
|
19
|
+
version: 0.3.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.3.0
|
26
|
+
version: 0.3.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: enju_leaf
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.3.
|
33
|
+
version: 1.3.1
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.3.
|
40
|
+
version: 1.3.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: enju_ndl
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.3.0
|
47
|
+
version: 0.3.0
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.3.0
|
54
|
+
version: 0.3.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: sqlite3
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -511,12 +511,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
511
511
|
version: '0'
|
512
512
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
513
513
|
requirements:
|
514
|
-
- - "
|
514
|
+
- - ">="
|
515
515
|
- !ruby/object:Gem::Version
|
516
|
-
version:
|
516
|
+
version: '0'
|
517
517
|
requirements: []
|
518
518
|
rubyforge_project:
|
519
|
-
rubygems_version: 2.6.14.
|
519
|
+
rubygems_version: 2.6.14.3
|
520
520
|
signing_key:
|
521
521
|
specification_version: 4
|
522
522
|
summary: enju_queestion plugin
|