tests: fixup comment vote, post controller tests.
Use git clean to delete stale files from an earlier checkout. These files interfered with various things (specifically, a comment vote test failed because there was an old comment_votes/create.json.erb template hanging around that changed the behavior of the POST /comment_votes endpoint).
This commit is contained in:
@@ -25,5 +25,6 @@ RUN sed -i'' -e 's/run -it/run -i/' /usr/local/bin/circleci
|
||||
|
||||
USER danbooru
|
||||
RUN git reset --hard master
|
||||
RUN git clean --force
|
||||
RUN gem install bundler --version $BUNDLER_VERSION
|
||||
RUN bundle install > /dev/null
|
||||
|
||||
@@ -220,7 +220,7 @@ class PostsControllerTest < ActionDispatch::IntegrationTest
|
||||
|
||||
context "in api responses" do
|
||||
should "not include restricted attributes" do
|
||||
as(@user) { @post.update(tag_string: "loli") }
|
||||
Post.any_instance.stubs(:visible?).returns(false)
|
||||
get_auth post_path(@post), @user, as: :json
|
||||
|
||||
assert_response :success
|
||||
|
||||
Reference in New Issue
Block a user