Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
diaspora
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Milan
diaspora
Commits
97153ad0
Commit
97153ad0
authored
Jun 08, 2015
by
Benjamin Neff
Committed by
Dennis Schubert
Jun 08, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update tests for new twitter client
closes #6083
parent
ec4e7b4a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
Changelog.md
Changelog.md
+1
-0
spec/models/services/twitter_spec.rb
spec/models/services/twitter_spec.rb
+4
-4
No files found.
Changelog.md
View file @
97153ad0
...
...
@@ -27,6 +27,7 @@
*
Make used post title lengths more consistent
[
#6022
](
https://github.com/diaspora/diaspora/pull/6022
)
*
Improved logging source
[
#6041
](
https://github.com/diaspora/diaspora/pull/6041
)
*
Gracefully handle duplicate entry while receiving share-visibility in parallel
[
#6068
](
https://github.com/diaspora/diaspora/pull/6068
)
*
Update twitter gem to get rid of deprecation warnings
[
#6083
](
https://github.com/diaspora/diaspora/pull/6083
)
## Bug fixes
*
Disable auto follow back on aspect deletion
[
#5846
](
https://github.com/diaspora/diaspora/pull/5846
)
...
...
spec/models/services/twitter_spec.rb
View file @
97153ad0
...
...
@@ -12,11 +12,11 @@ describe Services::Twitter, :type => :model do
describe
'#post'
do
before
do
allow_any_instance_of
(
Twitter
::
Client
).
to
receive
(
:update
)
{
Twitter
::
Tweet
.
new
(
id:
"1234"
)
}
allow_any_instance_of
(
Twitter
::
REST
::
Client
).
to
receive
(
:update
)
{
Twitter
::
Tweet
.
new
(
id:
"1234"
)
}
end
it
'posts a status message to twitter'
do
expect_any_instance_of
(
Twitter
::
Client
).
to
receive
(
:update
).
with
(
instance_of
(
String
))
expect_any_instance_of
(
Twitter
::
REST
::
Client
).
to
receive
(
:update
).
with
(
instance_of
(
String
))
@service
.
post
(
@post
)
end
...
...
@@ -27,7 +27,7 @@ describe Services::Twitter, :type => :model do
it
'swallows exception raised by twitter always being down'
do
skip
expect_any_instance_of
(
Twitter
::
Client
).
to
receive
(
:update
).
and_raise
(
StandardError
)
expect_any_instance_of
(
Twitter
::
REST
::
Client
).
to
receive
(
:update
).
and_raise
(
StandardError
)
@service
.
post
(
@post
)
end
...
...
@@ -141,7 +141,7 @@ describe Services::Twitter, :type => :model do
it
'returns the original profile photo url'
do
user_double
=
double
expect
(
user_double
).
to
receive
(
:profile_image_url_https
).
with
(
"original"
).
and_return
(
"http://a2.twimg.com/profile_images/uid/avatar.png"
)
expect_any_instance_of
(
Twitter
::
Client
).
to
receive
(
:user
).
with
(
"joindiaspora"
).
and_return
(
user_double
)
expect_any_instance_of
(
Twitter
::
REST
::
Client
).
to
receive
(
:user
).
with
(
"joindiaspora"
).
and_return
(
user_double
)
@service
.
nickname
=
"joindiaspora"
expect
(
@service
.
profile_photo_url
).
to
eq
(
"http://a2.twimg.com/profile_images/uid/avatar.png"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment