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:
evazion
2019-09-09 15:06:24 -05:00
parent d812a19902
commit 059e061b15
2 changed files with 2 additions and 1 deletions

View File

@@ -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

View File

@@ -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